PageFinder class

Matches selector strings to pages

Hookable methods:


Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the PageFinder class also inherits all the methods and properties of: Wire.

Show class?     Show args?       Only hookable?    

Common

NameReturnSummary 
PageFinder::count($selectors)
int

Return a count of pages that match

 
PageFinder::find($selectors)
array DatabaseQuerySelect

Return all pages matching the given selector.

PageFinder::findIDs($selectors)
array

Same as find() but returns just a simple array of page IDs without any other info

 
PageFinder::findParentIDs($selectors)
array

Same as findIDs() but returns the parent IDs of the pages that matched

 
PageFinder::findTemplateIDs($selectors)
array

Find template ID for each page — returns array of template IDs indexed by page ID

 
PageFinder::findVerboseIDs($selectors)
array DatabaseQuerySelect

Returns array of arrays with all columns in pages table indexed by page ID

 
PageFinder::getLimit()
int

Returns the limit placed upon the last find() operation, or 0 if no limit was specified

 
PageFinder::getOptions()
array

Return array of the options provided to PageFinder, as well as those determined at runtime

 
PageFinder::getPageArrayData()
array

Get data that should be populated back to any resulting PageArray’s data() method

 
PageFinder::getParentID()
int

Returns the parent ID, if it was part of the selector

 
PageFinder::getStart()
int

Returns the start placed upon the last find() operation

 
PageFinder::getTemplatesID()
int null

Returns the templates ID, if it was part of the selector

 
PageFinder::getTotal()
int

Returns the total number of results returned from the last find() operation

 
PageFinder::syntaxError(string $message)
None

Throw a fatal syntax error

 

Properties

NameReturnSummary 
PageFinder::checkAccess bool 
PageFinder::includeMode string 

Additional methods and properties

In addition to the methods and properties above, PageFinder also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.253