Skip to content

Kirby 5.1.1

$layouts->append()

Appends an element to the data array

$layouts->append(string|Kirby\Cms\Layout ...$args): Kirby\Cms\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->append($object);
$collection->append('key', $object);