Skip to content

Kirby 6.0.0

$translations->indexOf()

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

$translations->indexOf(string|Translation $needle): int|false

Parameters

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

Return types

intorfalse

Parent class

Kirby\Cms\Translations inherited from Kirby\Cms\Collection