Skip to content

Kirby 5.1.2

$roles->nth()

Returns the nth element from the collection

$roles->nth(int $n): Kirby\Cms\Role|null

Parameters

Name Type Default
$nrequired int no default value

Return types

Kirby\Cms\Roleornull

This method modifies the existing $roles object it is applied to and returns it again.

Parent class

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