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

Latest news

  • ProcessWire Weekly #542
    In the 542nd issue of ProcessWire Weekly we'll check out a couple of new third party modules, a new site of the week, and more. Read on!
    Weekly.pw / 28 September 2024
  • Custom Fields Module
    This week we look at a new ProFields module named Custom Fields. This module provides a way to rapidly build out ProcessWire fields that contain any number of subfields/properties within them.
    Blog / 30 August 2024
  • Subscribe to weekly ProcessWire news

“We were really happy to build our new portfolio website on ProcessWire! We wanted something that gave us plenty of control on the back-end, without any bloat on the front end - just a nice, easy to access API for all our content that left us free to design and build however we liked.” —Castus, web design agency in Sheffield, UK