Skip to content

Kirby 6.0.0

$users->prepend()

Prepends an element to the data array

$users->prepend(string|User ...$args): Users

Parameters

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

Return type

Kirby\Cms\Users

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

Parent class

Kirby\Cms\Users inherited from Kirby\Cms\LazyCollection

Examples

$collection->prepend('key', $value);
$collection->prepend($value);