Skip to content

Kirby 6.0.0

$roles->update()

Updates an object in the collection

$roles->update(string|Role $key, Role|null $object = null): Roles

Parameters

Name Type Default Description
$keyrequired stringorKirby\Cms\Role no default value Key or object to update
$object Kirby\Cms\Roleornull null New object for the key

Return type

Kirby\Cms\Roles

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