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