PageComparison::is()

Is this page of the given type? (status, template, etc.)

Usage

$bool = $pageComparison->is(Page $page, $status);

Arguments

NameType(s)Description
$pagePage
$statusint string array Selectors Page Template

One of the following:

  • Status expressed as int (using Page::status* constants)
  • Status expressed as string/name, i.e. "hidden" 3.0.150+
  • Template name, indicating page type
  • Page or Template object 3.0.150+
  • Selector string or Selectors object that must match
  • Array of any of the above where all have to match 3.0.150+

Return value

bool


PageComparison methods and properties

API reference based on ProcessWire core version 3.0.255