$nestCollection->set()
Adds a new element to the collection
$nestCollection->set(array|string $key, Kirby\Cms\NestObject|Kirby\Content\Field|null $value = null): Kirby\Cms\NestCollection
Parameters
Name | Type | Default |
---|---|---|
$keyrequired | array orstring |
no default value |
$value | Kirby\Cms\NestObject orKirby\Content\Field ornull |
null
|
Return type
This method modifies the existing $nestcollection
object it is applied to and returns it again.
Parent class
Kirby\Cms\NestCollection
inherited from Kirby\Toolkit\Collection