Skip to content

Kirby 4.4.1

$pages->set()

Adds a new element to the collection

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

Parameters

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

Return type

Kirby\Cms\Pages

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

Parent class

Kirby\Cms\Pages inherited from Kirby\Toolkit\Collection