protected function Extension::isConfigEnabled in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/dependency-injection/Extension/Extension.php \Symfony\Component\DependencyInjection\Extension\Extension::isConfigEnabled()
Parameters
ContainerBuilder $container:
array $config:
Return value
bool Whether the configuration is enabled
Throws
InvalidArgumentException When the config is not enableable
File
- vendor/
symfony/ dependency-injection/ Extension/ Extension.php, line 116
Class
- Extension
- Provides useful features shared by many extensions.
Namespace
Symfony\Component\DependencyInjection\ExtensionCode
protected function isConfigEnabled(ContainerBuilder $container, array $config) {
if (!array_key_exists('enabled', $config)) {
throw new InvalidArgumentException("The config array has no 'enabled' key.");
}
return (bool) $container
->getParameterBag()
->resolveValue($config['enabled']);
}