Skip to content

Kirby 3.6.6

$blocks->set()

Adds a new element to the collection

$blocks->set(mixed $key, mixed $value = null): Kirby\Cms\Blocks

Parameters

Name Type Default Description
$key * mixed string or array
$value mixed null

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\Toolkit\Collection