Skip to content

Kirby 5.1.2

$versions->keyOf()

Tries to find the key for the given element

$versions->keyOf(Kirby\Content\Version $needle): int|string|false

Parameters

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

Return types

intorstringorfalse

the name of the key or false

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

Parent class

Kirby\Content\Versions inherited from Kirby\Toolkit\Iterator