Skip to content

Kirby 6.0.0

$lazyCollection->add()

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

$lazyCollection->add(Collection|mixed $object): LazyCollection

Parameters

Name Type Default
$objectrequired Kirby\Cms\Collection<mixed>ormixed no default value

Return type

Kirby\Cms\LazyCollection

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

Parent class

Kirby\Cms\LazyCollection inherited from Kirby\Cms\Collection