Skip to content

Kirby 5.0.1

$structure->keyOf()

Tries to find the key for the given element

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

Parameters

Name Type Default Description
$needlerequired Kirby\Cms\StructureObject no default value the element to search for

Return types

intorstringorfalse

the name of the key or false

Parent class

Kirby\Cms\Structure inherited from Kirby\Toolkit\Iterator