PagePaths class

Keeps a cache of page paths to improve performance and

make paths more queryable by selectors.


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

Show class?     Show args?       Only hookable?    

Common

NameReturnSummary 
PagePaths::getID(string $path)
int null

Given a page path, return the page ID or NULL if not found.

 
PagePaths::getLanguages()
Languages Language

Returns Languages object or false if not available

 
PagePaths::getMatchQuery(DatabaseQuerySelect $query, Selector $selector)
None

Perform a path match for use by PageFinder

 
PagePaths::getPageAndLanguageID($path)
array

Given a page path return array of [ page_id, language_id ]

 
PagePaths::getPageID($path)
int null

Given a page path, return the page ID or 0 if not found.

 
PagePaths::getPageInfo(string $path)
array bool

Get page information about a given path

 
PagePaths::getPath(int $pageId)
string null

Given a page ID, return the page path, NULL if not found, or boolean false if cannot be determined.

 
PagePaths::getPaths(int $pageId)
array

Given a page ID, return all paths found for page

 
PagePaths::getRootSegments()
array

Get root segments

 
PagePaths::isRootSegment(string $segment)
int

Is given segment/page name a root segment?

 
PagePaths::rebuild()
int

Rebuild all paths table starting with $page and descending to its children

 
PagePaths::upgrade($fromVersion, $toVersion)
None

Upgrade module

Properties

NameReturnSummary 
PagePaths::rootSegments array 

Additional methods and properties

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

API reference based on ProcessWire core version 3.0.252