Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Extension.php

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\Extension

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal