Skip to content

Kirby 5.1.2

$roles->has()

Checks if the given object or id is in the collection

$roles->has(string|Kirby\Cms\Role $key): bool

Parameters

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

Return type

bool

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

Parent class

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