function Extension::isConfigEnabled
Throws
InvalidArgumentException When the config is not enableable
File
-
vendor/
symfony/ dependency-injection/ Extension/ Extension.php, line 127
Class
- Extension
- Provides useful features shared by many extensions.
Namespace
Symfony\Component\DependencyInjection\ExtensionCode
protected function isConfigEnabled(ContainerBuilder $container, array $config) : bool {
if (!\array_key_exists('enabled', $config)) {
throw new InvalidArgumentException("The config array has no 'enabled' key.");
}
return (bool) $container->getParameterBag()
->resolveValue($config['enabled']);
}