You are here

public function ConfigNamesMapper::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/config_translation/src/ConfigNamesMapper.php \Drupal\config_translation\ConfigNamesMapper::__construct()

Constructs a ConfigNamesMapper.

Parameters

$plugin_id: The config mapper plugin ID.

mixed $plugin_definition: An array of plugin information with the following keys:

  • title: The title of the mapper, used for generating page titles.
  • base_route_name: The route name of the base route this mapper is attached to.
  • names: (optional) An array of configuration names.
  • weight: (optional) The weight of this mapper, used in mapper listings. Defaults to 20.
  • list_controller: (optional) Class name for list controller used to generate lists of this type of configuration.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory.

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

\Drupal\locale\LocaleConfigManager $locale_config_manager: The locale configuration manager.

\Drupal\config_translation\ConfigMapperManagerInterface $config_mapper_manager: The mapper plugin discovery service.

\Drupal\Core\Routing\RouteProviderInterface: The route provider.

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation manager.

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

Throws

\Symfony\Component\Routing\Exception\RouteNotFoundException Throws an exception if the route specified by the 'base_route_name' in the plugin definition could not be found by the route provider.

Overrides PluginBase::__construct

1 call to ConfigNamesMapper::__construct()
ConfigEntityMapper::__construct in core/modules/config_translation/src/ConfigEntityMapper.php
Constructs a ConfigEntityMapper.
1 method overrides ConfigNamesMapper::__construct()
ConfigEntityMapper::__construct in core/modules/config_translation/src/ConfigEntityMapper.php
Constructs a ConfigEntityMapper.

File

core/modules/config_translation/src/ConfigNamesMapper.php, line 127
Contains \Drupal\config_translation\ConfigNamesMapper.

Class

ConfigNamesMapper
Configuration mapper base implementation.

Namespace

Drupal\config_translation

Code

public function __construct($plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config, LocaleConfigManager $locale_config_manager, ConfigMapperManagerInterface $config_mapper_manager, RouteProviderInterface $route_provider, TranslationInterface $string_translation, LanguageManagerInterface $language_manager) {
  $this->pluginId = $plugin_id;
  $this->pluginDefinition = $plugin_definition;
  $this->routeProvider = $route_provider;
  $this->configFactory = $config_factory;
  $this->typedConfigManager = $typed_config;
  $this->localeConfigManager = $locale_config_manager;
  $this->configMapperManager = $config_mapper_manager;
  $this->stringTranslation = $string_translation;
  $this->languageManager = $language_manager;
}