$pages->indexOf()
Correct position detection for objects. The method will automatically detect objects or ids and then search accordingly.
$pages->indexOf(string|Kirby\Cms\Page $needle): int|false
Parameters
Name | Type | Default |
---|---|---|
$needlerequired | string orKirby\Cms\Page |
no default value |
Return types
int
orfalse
Parent class
Kirby\Cms\Pages
inherited from Kirby\Cms\Collection