PageFinder class

Located in file /wire/core/PageFinder.php

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?        

Common

NameReturnSummary 
PageFinder::checkAccess bool 
PageFinder::count($selectors)
intReturn a count of pages that match 
PageFinder::find($selectors)
array DatabaseQuerySelectReturn all pages matching the given selector.
PageFinder::findIDs($selectors)
arraySame as find() but returns just a simple array of page IDs without any other info 
PageFinder::findParentIDs($selectors)
arraySame as findIDs() but returns the parent IDs of the pages that matched 
PageFinder::findTemplateIDs($selectors)
arrayFind template ID for each page — returns array of template IDs indexed by page ID 
PageFinder::findVerboseIDs($selectors)
array DatabaseQuerySelectReturns array of arrays with all columns in pages table indexed by page ID 
PageFinder::getLimit()
intReturns the limit placed upon the last find() operation, or 0 if no limit was specified 
PageFinder::getOptions()
arrayReturn array of the options provided to PageFinder, as well as those determined at runtime 
PageFinder::getPageArrayData()
arrayGet data that should be populated back to any resulting PageArray’s data() method 
PageFinder::getParentID()
intReturns the parent ID, if it was part of the selector 
PageFinder::getQuery($selectors, array $options)
DatabaseQuerySelect
PageFinder::getQueryAllowedTemplatesWhere(DatabaseQuerySelect $query, $where)
string
PageFinder::getQueryJoinPath(DatabaseQuerySelect $query, $selector)
(nothing)
PageFinder::getQueryUnknownField($fieldName, array $data)
bool Field;
PageFinder::getStart()
intReturns the start placed upon the last find() operation 
PageFinder::getTemplatesID()
int nullReturns the templates ID, if it was part of the selector 
PageFinder::getTotal()
intReturns the total number of results returned from the last find() operation 
PageFinder::includeMode string 
PageFinder::syntaxError(string $message)
(nothing)Throw a fatal syntax error 

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.244

Latest news

  • ProcessWire Weekly #559
    The 559th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
    Weekly.pw / 25 January 2025
  • ProcessWire 3.0.244 new main/master version
    ProcessWire 3.0.244 is our newest main/master/stable version. It's been more than a year in the making and is packed with tons of new features, issue fixes, optimizations and more. This post covers all the details.
    Blog / 18 January 2025
  • Subscribe to weekly ProcessWire news

“To Drupal, or to ProcessWire? The million dollar choice. We decided to make an early switch to PW. And in retrospect, ProcessWire was probably the best decision we made. Thanks are due to ProcessWire and the amazing system and set of modules that are in place.” —Unni Krishnan, Founder of PigtailPundits