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

Breadcrumb

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

function ConfigMapperManager::__construct

Constructs a ConfigMapperManager.

Parameters

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: The cache backend.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\Core\Config\TypedConfigManagerInterface $typed_config_manager: The typed config manager.

\Drupal\Core\Extension\ThemeHandlerInterface $theme_handler: The theme handler.

Overrides DefaultPluginManager::__construct

File

core/modules/config_translation/src/ConfigMapperManager.php, line 70

Class

ConfigMapperManager
Manages plugins for configuration translation mappers.

Namespace

Drupal\config_translation

Code

public function __construct(CacheBackendInterface $cache_backend, LanguageManagerInterface $language_manager, ModuleHandlerInterface $module_handler, TypedConfigManagerInterface $typed_config_manager, ThemeHandlerInterface $theme_handler) {
    $this->typedConfigManager = $typed_config_manager;
    $this->languageManager = $language_manager;
    $this->factory = new ContainerFactory($this, '\\Drupal\\config_translation\\ConfigMapperInterface');
    // Let others alter definitions with hook_config_translation_info_alter().
    $this->moduleHandler = $module_handler;
    $this->themeHandler = $theme_handler;
    $this->alterInfo('config_translation_info');
    // Config translation only uses an info hook discovery, cache by language.
    $cache_key = 'config_translation_info_plugins' . ':' . $language_manager->getCurrentLanguage()
        ->getId();
    $this->setCacheBackend($cache_backend, $cache_key);
}
RSS feed
Powered by Drupal