$kirby->option()
Load a specific configuration option
$kirby->option(string $key, mixed $default = null): mixed|null
Parameters
Name | Type | Default |
---|---|---|
$key * | string |
– |
$default | mixed |
null |
Return type
mixed
|null
Parent class
Example
return [
'my' => [
'option' => 'foo'
]
];
$kirby->option('my.option') // 'foo'
$kirby->option('another.option', 'my fallback') // 'my fallback'