diff --git a/core/modules/config_translation/src/ConfigNamesMapper.php b/core/modules/config_translation/src/ConfigNamesMapper.php index bc66303..dac1a66 100644 --- a/core/modules/config_translation/src/ConfigNamesMapper.php +++ b/core/modules/config_translation/src/ConfigNamesMapper.php @@ -134,16 +134,13 @@ class ConfigNamesMapper extends PluginBase implements ConfigMapperInterface, Con 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, EventDispatcherInterface $event_dispatcher = NULL) { $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->routeProvider = $route_provider; $this->stringTranslation = $string_translation; $this->languageManager = $language_manager; - $this->eventDispatcher = $event_dispatcher ?: \Drupal::service('event_dispatcher'); } @@ -383,7 +380,7 @@ public function getWeight() { public function populateFromRouteMatch(RouteMatchInterface $route_match) { $this->setLangcode($route_match->getParameter('langcode')); - // Dispatches the ConfigTranslationEvents::POPULATE_MAPPER event + // Dispatches the ConfigTranslationEvents::POPULATE_MAPPER event. $event = new ConfigMapperPopulateEvent($this, $route_match); $this->eventDispatcher->dispatch(ConfigTranslationEvents::POPULATE_MAPPER, $event); } diff --git a/core/modules/config_translation/tests/src/Kernel/ConfigMapperTest.php b/core/modules/config_translation/tests/src/Kernel/ConfigMapperTest.php index 681ce7c..bcb169a 100644 --- a/core/modules/config_translation/tests/src/Kernel/ConfigMapperTest.php +++ b/core/modules/config_translation/tests/src/Kernel/ConfigMapperTest.php @@ -44,7 +44,7 @@ public function testAddingConfigNames() { // Call populateFromRouteMatch() to dispatch an event. $mapper->populateFromRouteMatch(new RouteMatch('test', new Route('/'))); - // Test that it now contains the new config name from config_translation_test. + // Test that it contains the new config name from config_translation_test. $config_names = $mapper->getConfigNames(); $this->assertTrue(in_array('config_translation_test.content', $config_names)); }