public function LingotekConfigSubscriber::__construct in Lingotek Translation 8.2
Same name and namespace in other branches
- 8 src/EventSubscriber/LingotekConfigSubscriber.php \Drupal\lingotek\EventSubscriber\LingotekConfigSubscriber::__construct()
- 4.0.x src/EventSubscriber/LingotekConfigSubscriber.php \Drupal\lingotek\EventSubscriber\LingotekConfigSubscriber::__construct()
- 3.0.x src/EventSubscriber/LingotekConfigSubscriber.php \Drupal\lingotek\EventSubscriber\LingotekConfigSubscriber::__construct()
- 3.1.x src/EventSubscriber/LingotekConfigSubscriber.php \Drupal\lingotek\EventSubscriber\LingotekConfigSubscriber::__construct()
- 3.2.x src/EventSubscriber/LingotekConfigSubscriber.php \Drupal\lingotek\EventSubscriber\LingotekConfigSubscriber::__construct()
- 3.3.x src/EventSubscriber/LingotekConfigSubscriber.php \Drupal\lingotek\EventSubscriber\LingotekConfigSubscriber::__construct()
- 3.4.x src/EventSubscriber/LingotekConfigSubscriber.php \Drupal\lingotek\EventSubscriber\LingotekConfigSubscriber::__construct()
- 3.5.x src/EventSubscriber/LingotekConfigSubscriber.php \Drupal\lingotek\EventSubscriber\LingotekConfigSubscriber::__construct()
- 3.6.x src/EventSubscriber/LingotekConfigSubscriber.php \Drupal\lingotek\EventSubscriber\LingotekConfigSubscriber::__construct()
- 3.7.x src/EventSubscriber/LingotekConfigSubscriber.php \Drupal\lingotek\EventSubscriber\LingotekConfigSubscriber::__construct()
- 3.8.x src/EventSubscriber/LingotekConfigSubscriber.php \Drupal\lingotek\EventSubscriber\LingotekConfigSubscriber::__construct()
Constructs a LingotekConfigSubscriber.
Parameters
\Drupal\lingotek\LingotekConfigTranslationServiceInterface $translation_service: The Lingotek config translation service.
\Drupal\config_translation\ConfigMapperManagerInterface $mapper_manager: The configuration mapper manager.
\Drupal\lingotek\LingotekConfigurationServiceInterface $lingotek_configuration: The Lingotek configuration service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity manager service.
\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity field manager.
File
- src/
EventSubscriber/ LingotekConfigSubscriber.php, line 80
Class
- LingotekConfigSubscriber
- Updates config Lingotek translation status when saved.
Namespace
Drupal\lingotek\EventSubscriberCode
public function __construct(LingotekConfigTranslationServiceInterface $translation_service, ConfigMapperManagerInterface $mapper_manager, LingotekConfigurationServiceInterface $lingotek_configuration = NULL, EntityTypeManagerInterface $entity_type_manager = NULL, EntityFieldManagerInterface $entity_field_manager = NULL) {
$this->translationService = $translation_service;
$this->mapperManager = $mapper_manager;
$this->mappers = $mapper_manager
->getMappers();
if (!$lingotek_configuration) {
@trigger_error('The lingotek.configuration service must be passed to LingotekConfigSubscriber::__construct, it is required before Lingotek 9.x-1.0. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
$lingotek_configuration = \Drupal::service('lingotek.configuration');
}
if (!$entity_type_manager) {
@trigger_error('The entity_type.manager service must be passed to LingotekConfigSubscriber::__construct, it is required before Lingotek 9.x-1.0. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
$entity_type_manager = \Drupal::service('entity_type.manager');
}
if (!$entity_field_manager) {
@trigger_error('The entity_field.manager service must be passed to LingotekManagementFormBase::__construct, it is required before Lingotek 9.x-1.0. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
$entity_field_manager = \Drupal::service('entity_field.manager');
}
$this->lingotekConfiguration = $lingotek_configuration;
$this->entityTypeManager = $entity_type_manager;
$this->entityFieldManager = $entity_field_manager;
}