Skip to content

Kirby 3.9.8

$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