You are here

public function LingotekContentTranslationHandler::__construct in Lingotek Translation 3.0.x

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

Initializes an instance of the content translation controller.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The info array of the given entity type.

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

\Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface $entity_last_installed_schema_repository: The entity last installed schema repository.

File

src/LingotekContentTranslationHandler.php, line 56

Class

LingotekContentTranslationHandler

Namespace

Drupal\lingotek

Code

public function __construct(EntityTypeInterface $entity_type, LanguageManagerInterface $language_manager, EntityLastInstalledSchemaRepositoryInterface $entity_last_installed_schema_repository) {
  $this->entityTypeId = $entity_type
    ->id();
  $this->entityType = $entity_type;
  $this->languageManager = $language_manager;
  $this->fieldStorageDefinitions = $entity_last_installed_schema_repository
    ->getLastInstalledFieldStorageDefinitions($this->entityTypeId);
}