$collection->keyOf()
Tries to find the key for the given element
$collection->keyOf(TValue $needle): int|string|false
Parameters
Name | Type | Default | Description |
---|---|---|---|
$needlerequired | TValue |
no default value | the element to search for |
Return types
int
orstring
orfalse
the name of the key or false
Parent class
Kirby\Cms\Collection
inherited from Kirby\Toolkit\Iterator