$page->is()
Compares the current object with the given page object
$page->is(Kirby\Cms\Page|string $page): bool
Parameters
| Name | Type | Default |
|---|---|---|
| $pagerequired | Kirby\Cms\Pageorstring |
no default value |
Return type
bool
This method modifies the existing $page object it is applied to and returns it again.
Parent class
Examples
Filter all articles for the current author page:
$postsForAuthor = page('blog')
->children()
->listed()
->filter(fn ($child) => $child->author()->toPage()?->is($page));