$api->collection()
Setter and getter for an API collection
$api->collection(string $name, array|null $collection = null): Kirby\Api\CollectionParameters
| Name | Type | Default | 
|---|---|---|
| $name * | string | – | 
| $collection | array|null | null | 
Return type
Exceptions
| Type | Description | 
|---|---|
| Kirby\Exception\NotFoundException | If no collection for $nameexists | 
| Exception | 
Parent class
  Kirby\Cms\Api    inherited from Kirby\Api\Api