Skip to content

$blocks->set()

Adds a new element to the collection

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

Parameters

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

Return type

Kirby\Toolkit\Collection

Parent class

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