$assets->findByKey()
Find a single element by key (id)
$assets->findByKey(string $key): Kirby\Plugin\Asset|null
Parameters
| Name | Type | Default |
|---|---|---|
| $keyrequired | string |
no default value |
Return types
Kirby\Plugin\Assetornull
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