Skip to content

Kirby 5.0.2

$layouts->add()

Adds a single object or an entire second collection to the current collection

$layouts->add(Kirby\Cms\Layouts|Kirby\Cms\Layout|array $object): Kirby\Cms\Layouts

Parameters

Name Type Default
$objectrequired Kirby\Cms\LayoutsorKirby\Cms\Layoutorarray no default value

Return type

Kirby\Cms\Layouts

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

Parent class

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