Skip to content

Kirby 6.0.0

$layouts->indexOf()

Correct position detection for objects. The method will automatically detect objects or ids and then search accordingly.

$layouts->indexOf(string|Layout $needle): int|false

Parameters

Name Type Default
$needlerequired stringorKirby\Cms\Layout no default value

Return types

intorfalse

Parent class

Kirby\Cms\Layouts inherited from Kirby\Cms\Collection