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