protected function Extension::isConfigEnabled in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/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
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ 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']);
}