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