Skip to content

Kirby 6.0.0

$blocks->append()

Appends an element to the data array

$blocks->append(string|Block ...$args): Blocks

Parameters

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

Return type

Kirby\Cms\Blocks

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

Parent class

Kirby\Cms\Blocks inherited from Kirby\Cms\Collection

Examples

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