Skip to content

Kirby 5.0.1

$items->append()

Appends an element to the data array

$items->append(string|Kirby\Cms\Item ...$args): Kirby\Cms\Items

Parameters

Name Type Default
...$args stringorKirby\Cms\Item no default value

Return type

Kirby\Cms\Items

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

Parent class

Kirby\Cms\Items inherited from Kirby\Cms\Collection

Examples

$collection->append($object);
$collection->append('key', $object);