Skip to content

Kirby 5.1.2

$roles->append()

Appends an element to the data array

$roles->append(string|Kirby\Cms\Role ...$args): Kirby\Cms\Roles

Parameters

Name Type Default
...$args stringorKirby\Cms\Role no default value

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

Examples

$collection->append($object);
$collection->append('key', $object);