Skip to content

Kirby 6.0.0

$layouts->prepend()

Prepends an element to the data array

$layouts->prepend(string|Layout ...$args): Layouts

Parameters

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

Return type

Kirby\Cms\Layouts

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

Parent class

Kirby\Cms\Layouts inherited from Kirby\Cms\Collection

Examples

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