$pages->findByKey()
Finds a page by its ID or URI
$pages->findByKey(string|null $key = null): Kirby\Cms\Page|null
Parameters
| Name | Type | Default |
|---|---|---|
| $key | stringornull |
null
|
Return types
Kirby\Cms\Pageornull
This method modifies the existing $pages object it is applied to and returns it again.