public ConfigNamesMapper::__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)
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 $route_provider: 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
File
- core/modules/config_translation/src/ConfigNamesMapper.php, line 123
Class
- ConfigNamesMapper
- Configuration mapper base implementation.
Namespace
Drupal\config_translation
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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 ; } |
Please login to continue.