$assets->keyOf()
Tries to find the key for the given element
$assets->keyOf(Kirby\Plugin\Asset $needle): int|string|false
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $needlerequired | Kirby\Plugin\Asset |
no default value | the element to search for |
Return types
intorstringorfalse
the name of the key or false
This method modifies the existing $assets object it is applied to and returns it again.
Parent class
Kirby\Plugin\Assets
inherited from Kirby\Toolkit\Iterator