$items->prepend()
Prepends an element to the data array
$items->prepend(string|Kirby\Cms\Item ...$args): Kirby\Cms\Items
Parameters
Name | Type | Default |
---|---|---|
...$args | string orKirby\Cms\Item |
no default value |
Return type
This method modifies the existing $
object it is applied to and returns it again.
Parent class
Kirby\Cms\Items
inherited from Kirby\Cms\Collection
Examples
$collection->prepend($object);
$collection->prepend('key', $object);