protected function Extension::isConfigEnabled

Parameters

ContainerBuilder $container:

array $config:

Return value

Boolean Whether the configuration is enabled

Throws

InvalidArgumentException When the config is not enableable

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Extension/Extension.php, line 118

Class

Extension
Provides useful features shared by many extensions.

Namespace

Symfony\Component\DependencyInjection\Extension

Code

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']);
}