function ConfigEntityMapper::__construct

Same name in other branches
  1. 9 core/modules/config_translation/src/ConfigEntityMapper.php \Drupal\config_translation\ConfigEntityMapper::__construct()
  2. 10 core/modules/config_translation/src/ConfigEntityMapper.php \Drupal\config_translation\ConfigEntityMapper::__construct()
  3. 11.x core/modules/config_translation/src/ConfigEntityMapper.php \Drupal\config_translation\ConfigEntityMapper::__construct()

Constructs a ConfigEntityMapper.

Parameters

string $plugin_id: The config mapper plugin ID.

mixed $plugin_definition: An array of plugin information as documented in ConfigNamesMapper::__construct() with the following additional keys:

  • entity_type: The name of the entity type this mapper belongs to.

\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 $translation_manager: The string translation manager.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity manager.

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

\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: The event dispatcher.

Overrides ConfigNamesMapper::__construct

File

core/modules/config_translation/src/ConfigEntityMapper.php, line 90

Class

ConfigEntityMapper
Configuration mapper for configuration entities.

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 $translation_manager, EntityTypeManagerInterface $entity_type_manager, LanguageManagerInterface $language_manager, EventDispatcherInterface $event_dispatcher = NULL) {
    parent::__construct($plugin_id, $plugin_definition, $config_factory, $typed_config, $locale_config_manager, $config_mapper_manager, $route_provider, $translation_manager, $language_manager, $event_dispatcher);
    $this->setType($plugin_definition['entity_type']);
    $this->entityTypeManager = $entity_type_manager;
}

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