function ConfigActionManager::__construct

Same name in other branches
  1. 11.x core/lib/Drupal/Core/Config/Action/ConfigActionManager.php \Drupal\Core\Config\Action\ConfigActionManager::__construct()

Constructs a new \Drupal\Core\Config\Action\ConfigActionManager object.

Parameters

\Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations.

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend instance to use.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler to invoke the alter hook with.

\Drupal\Core\Config\ConfigManagerInterface $configManager: The config manager.

\Drupal\Core\Config\StorageInterface $configStorage: The active config storage.

\Drupal\Core\Config\TypedConfigManagerInterface $typedConfig: The typed configuration manager service.

\Drupal\Core\Config\ConfigFactoryInterface $configFactory: The config factory service.

Overrides DefaultPluginManager::__construct

File

core/lib/Drupal/Core/Config/Action/ConfigActionManager.php, line 92

Class

ConfigActionManager

Namespace

Drupal\Core\Config\Action

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, ConfigManagerInterface $configManager, StorageInterface $configStorage, TypedConfigManagerInterface $typedConfig, ConfigFactoryInterface $configFactory) {
    assert($namespaces instanceof \ArrayAccess, '$namespaces can be accessed like an array');
    // Enable this namespace to be searched for plugins.
    $namespaces[__NAMESPACE__] = 'core/lib/Drupal/Core/Config/Action';
    parent::__construct('Plugin/ConfigAction', $namespaces, $module_handler, ConfigActionPluginInterface::class, ConfigAction::class);
    $this->alterInfo('config_action');
    $this->setCacheBackend($cache_backend, 'config_action');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.