Skip to content

Kirby 5.1.4

$options->add()

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

$options->add(Kirby\Cms\Collection|array|Kirby\Option\Option $object): Kirby\Option\Options

Parameters

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

Return type

Kirby\Option\Options

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

Parent class

Kirby\Option\Options inherited from Kirby\Cms\Collection