Skip to content

Kirby 5.0.4

$structure->indexOf()

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

$structure->indexOf(string|Kirby\Cms\StructureObject $needle): int|false

Parameters

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

Return types

intorfalse

This method modifies the existing $structure object it is applied to and returns it again.

Parent class

Kirby\Cms\Structure inherited from Kirby\Cms\Collection