Skip to content

Kirby 5.1.2

$assets->add()

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

$assets->add(Kirby\Plugin\Assets|Kirby\Plugin\Asset|array $object): Kirby\Plugin\Assets

Parameters

Name Type Default
$objectrequired Kirby\Plugin\AssetsorKirby\Plugin\Assetorarray no default value

Return type

Kirby\Plugin\Assets

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

Parent class

Kirby\Plugin\Assets inherited from Kirby\Cms\Collection