$files->add()
Adds a single file or an entire second collection to the current collection
$files->add(Files|File|string|null $object): Files
Parameters
| Name | Type | Default |
|---|---|---|
| $object | Kirby\Cms\Files<Kirby\Cms\File>orKirby\Cms\Fileorstringornull |
no default value |
Return type
This method modifies the existing $files object it is applied to and returns it again.
Exceptions
| Type | Description |
|---|---|
Kirby\Exception\InvalidArgumentException |
When no File or Files object or an ID of an existing file is passed |