Skip to content

Kirby 5.0.4

$collection->append()

Appends an element

$collection->append(string|TValue ...$args): Kirby\Toolkit\Collection

Parameters

Name Type Default
...$args stringorTValue no default value

Return type

Kirby\Toolkit\Collection

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

Parent class

Kirby\Toolkit\Collection

Examples

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