ContentTranslationHandler::__construct

public ContentTranslationHandler::__construct(EntityTypeInterface $entity_type, LanguageManagerInterface $language_manager, ContentTranslationManagerInterface $manager, EntityManagerInterface $entity_manager, AccountInterface $current_user)

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\content_translation\ContentTranslationManagerInterface $manager: The content translation manager service.

\Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager.

\Drupal\Core\Session\AccountInterface $current_user: The current user.

File

core/modules/content_translation/src/ContentTranslationHandler.php, line 85

Class

ContentTranslationHandler
Base class for content translation handlers.

Namespace

Drupal\content_translation

Code

public function __construct(EntityTypeInterface $entity_type, LanguageManagerInterface $language_manager, ContentTranslationManagerInterface $manager, EntityManagerInterface $entity_manager, AccountInterface $current_user) {
  $this->entityTypeId = $entity_type->id();
  $this->entityType = $entity_type;
  $this->languageManager = $language_manager;
  $this->manager = $manager;
  $this->currentUser = $current_user;
  $this->fieldStorageDefinitions = $entity_manager->getLastInstalledFieldStorageDefinitions($this->entityTypeId);
}
doc_Drupal
2016-10-29 08:58:16
Comments
Leave a Comment

Please login to continue.