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 #550
    In the 550th issue of ProcessWire Weekly we're going to check out the latest core updates, introduce a new third party module called PagefileMetadata, and more. Read on!
    Weekly.pw / 23 November 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

“I am currently managing a ProcessWire site with 2 million+ pages. It’s admirably fast, and much, much faster than any other CMS we tested.” —Nickie, Web developer