$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 | arrayorstring |
no default value |
| $value | Kirby\Plugin\Assetornull |
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