You are here

public function LanguageLocaleMapper::__construct in Lingotek Translation 8.2

Same name and namespace in other branches
  1. 8 src/LanguageLocaleMapper.php \Drupal\lingotek\LanguageLocaleMapper::__construct()
  2. 4.0.x src/LanguageLocaleMapper.php \Drupal\lingotek\LanguageLocaleMapper::__construct()
  3. 3.0.x src/LanguageLocaleMapper.php \Drupal\lingotek\LanguageLocaleMapper::__construct()
  4. 3.1.x src/LanguageLocaleMapper.php \Drupal\lingotek\LanguageLocaleMapper::__construct()
  5. 3.2.x src/LanguageLocaleMapper.php \Drupal\lingotek\LanguageLocaleMapper::__construct()
  6. 3.3.x src/LanguageLocaleMapper.php \Drupal\lingotek\LanguageLocaleMapper::__construct()
  7. 3.4.x src/LanguageLocaleMapper.php \Drupal\lingotek\LanguageLocaleMapper::__construct()
  8. 3.5.x src/LanguageLocaleMapper.php \Drupal\lingotek\LanguageLocaleMapper::__construct()
  9. 3.6.x src/LanguageLocaleMapper.php \Drupal\lingotek\LanguageLocaleMapper::__construct()
  10. 3.7.x src/LanguageLocaleMapper.php \Drupal\lingotek\LanguageLocaleMapper::__construct()
  11. 3.8.x src/LanguageLocaleMapper.php \Drupal\lingotek\LanguageLocaleMapper::__construct()

Constructs a new LingotekConfigTranslationService object.

Parameters

$entity_query: (deprecated) The entity query factory.

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

File

src/LanguageLocaleMapper.php, line 47

Class

LanguageLocaleMapper

Namespace

Drupal\lingotek

Code

public function __construct($entity_query, EntityTypeManagerInterface $entity_type_manager = NULL) {
  if (get_class($entity_query) === '\\Drupal\\Core\\Entity\\Query\\QueryFactory') {
    @trigger_error('The entity.query service is deprecated. Pass the entity_type.manager service to LingotekProfileUsage::__construct instead. It is required before Lingotek 9.x-1.0. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
  }
  if (!$entity_type_manager) {
    @trigger_error('The entity_type.manager service must be passed to LingotekProfileUsage::__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');
  }
  $this->entityTypeManager = $entity_type_manager;
}