$nestCollection->indexOf()
Tries to find the index number for the given element
$nestCollection->indexOf(Kirby\Cms\NestObject|Kirby\Content\Field $needle): int|false
Parameters
Name | Type | Default | Description |
---|---|---|---|
$needlerequired | Kirby\Cms\NestObject orKirby\Content\Field |
no default value | the element to search for |
Return types
int
orfalse
the index (int) of the element or false
This method modifies the existing $nestcollection
object it is applied to and returns it again.
Parent class
Kirby\Cms\NestCollection
inherited from Kirby\Toolkit\Iterator