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.
Common
| Name | Return | Summary | |
|---|
PagePaths::getID() PagePaths::getID(string $path) PagePaths::getID(string $path) | int null | Given a page path, return the page ID or NULL if not found. | |
PagePaths::getLanguages() PagePaths::getLanguages() PagePaths::getLanguages() | Languages Language | Returns Languages object or false if not available | |
PagePaths::getMatchQuery() PagePaths::getMatchQuery(DatabaseQuerySelect $query, Selector $selector) PagePaths::getMatchQuery(DatabaseQuerySelect $query, Selector $selector) | None | Perform a path match for use by PageFinder | |
PagePaths::getPageAndLanguageID() PagePaths::getPageAndLanguageID($path) PagePaths::getPageAndLanguageID($path) | array | Given a page path return array of [ page_id, language_id ] | |
PagePaths::getPageID() PagePaths::getPageID($path) PagePaths::getPageID($path) | int null | Given a page path, return the page ID or 0 if not found. | |
PagePaths::getPageInfo() PagePaths::getPageInfo(string $path) PagePaths::getPageInfo(string $path) | array bool | Get page information about a given path | |
PagePaths::getPath() PagePaths::getPath(int $pageId) PagePaths::getPath(int $pageId, int $languageId = 0) | string null | Given a page ID, return the page path, NULL if not found, or boolean false if cannot be determined. | |
PagePaths::getPaths() PagePaths::getPaths(int $pageId) PagePaths::getPaths(int $pageId) | array | Given a page ID, return all paths found for page | |
PagePaths::getRootSegments() PagePaths::getRootSegments() PagePaths::getRootSegments(bool $rebuild = false) | array | Get root segments | |
PagePaths::isRootSegment() PagePaths::isRootSegment(string $segment) PagePaths::isRootSegment(string $segment) | int | Is given segment/page name a root segment? | |
PagePaths::rebuild() PagePaths::rebuild() PagePaths::rebuild($page = null) | int | Rebuild all paths table starting with $page and descending to its children | |
PagePaths::upgrade() PagePaths::upgrade($fromVersion, $toVersion) PagePaths::upgrade($fromVersion, $toVersion) | None | Upgrade module | |
Properties
| Name | Return | Summary | |
|---|
| 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