$versions->indexOf()
Correct position detection for objects. The method will automatically detect objects or ids and then search accordingly.
$versions->indexOf(string|Kirby\Content\Version $needle): int|false
Parameters
| Name | Type | Default |
|---|---|---|
| $needlerequired | stringorKirby\Content\Version |
no default value |
Return types
intorfalse
This method modifies the existing $versions object it is applied to and returns it again.
Parent class
Kirby\Content\Versions
inherited from Kirby\Cms\Collection