Skip to content

Kirby 5.0.2

$roles->indexOf()

Correct position detection for objects. The method will automatically detect objects or ids and then search accordingly.

$roles->indexOf(string|Kirby\Cms\Role $needle): int|false

Parameters

Name Type Default
$needlerequired stringorKirby\Cms\Role no default value

Return types

intorfalse

Parent class

Kirby\Cms\Roles inherited from Kirby\Cms\Collection