Skip to content

Kirby 6.0.0

$versions->add()

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

$versions->add(Collection|Version $object): Versions

Parameters

Name Type Default
$objectrequired Kirby\Cms\Collection<Kirby\Content\Version>orKirby\Content\Version no default value

Return type

Kirby\Content\Versions

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

Parent class

Kirby\Content\Versions inherited from Kirby\Cms\Collection