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