Skip to content

Kirby 5.1.4

$translations->add()

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

$translations->add(Kirby\Cms\Collection|array|Kirby\Cms\Translation $object): Kirby\Cms\Translations

Parameters

Name Type Default
$objectrequired Kirby\Cms\Collection<TValue>orarray<TValue>orKirby\Cms\Translation no default value

Return type

Kirby\Cms\Translations

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

Parent class

Kirby\Cms\Translations inherited from Kirby\Cms\Collection