Skip to content

Kirby 5.0.4

$versions->add()

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

$versions->add(Kirby\Content\Versions|Kirby\Content\Version|array $object): Kirby\Content\Versions

Parameters

Name Type Default
$objectrequired Kirby\Content\VersionsorKirby\Content\Versionorarray 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