public function LingotekContentTranslationService::__construct in Lingotek Translation 8.2
Same name and namespace in other branches
- 8 src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::__construct()
- 4.0.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::__construct()
- 3.0.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::__construct()
- 3.1.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::__construct()
- 3.2.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::__construct()
- 3.3.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::__construct()
- 3.4.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::__construct()
- 3.5.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::__construct()
- 3.6.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::__construct()
- 3.7.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::__construct()
- 3.8.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::__construct()
Constructs a new LingotekContentTranslationService object.
Parameters
\Drupal\lingotek\LingotekInterface $lingotek: An lingotek object.
\Drupal\lingotek\LanguageLocaleMapperInterface $language_locale_mapper: The language-locale mapper.
\Drupal\lingotek\LingotekConfigurationServiceInterface $lingotek_configuration: The Lingotek configuration service.
\Drupal\lingotek\LingotekConfigTranslationServiceInterface $lingotek_config_translation: The Lingotek config translation service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: An entity manager object.
\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.
\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity field manager.
\Drupal\Core\Database\Connection $connection: The database connection object.
File
- src/
LingotekContentTranslationService.php, line 113
Class
- LingotekContentTranslationService
- Service for managing Lingotek content translations.
Namespace
Drupal\lingotekCode
public function __construct(LingotekInterface $lingotek, LanguageLocaleMapperInterface $language_locale_mapper, LingotekConfigurationServiceInterface $lingotek_configuration, LingotekConfigTranslationServiceInterface $lingotek_config_translation, EntityTypeManagerInterface $entity_type_manager, LanguageManagerInterface $language_manager, EntityFieldManagerInterface $entity_field_manager = NULL, Connection $connection = NULL) {
$this->lingotek = $lingotek;
$this->languageLocaleMapper = $language_locale_mapper;
$this->lingotekConfiguration = $lingotek_configuration;
$this->lingotekConfigTranslation = $lingotek_config_translation;
$this->entityTypeManager = $entity_type_manager;
$this->languageManager = $language_manager;
if (!$entity_field_manager) {
@trigger_error('The entity_field.manager service must be passed to LingotekContentTranslationService::__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');
}
if (!$connection) {
@trigger_error('The database service must be passed to LingotekContentTranslationService::__construct, it is required before Lingotek 9.x-1.0. See https://www.drupal.org/node/2993033.', E_USER_DEPRECATED);
$connection = \Drupal::service('database');
}
$this->entityFieldManager = $entity_field_manager;
$this->connection = $connection;
}