Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ContentTranslationHandler.php

function ContentTranslationHandler::__construct

Initializes an instance of the content translation controller.

Parameters

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

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

\Drupal\content_translation\ContentTranslationManagerInterface $manager: The content translation manager service.

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

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

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger service.

\Drupal\Core\Datetime\DateFormatterInterface $dateFormatter: The date formatter service.

\Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface $entity_last_installed_schema_repository: The installed entity definition repository service.

\Drupal\Core\Routing\RedirectDestinationInterface $redirectDestination: The request stack.

\Drupal\Component\Datetime\TimeInterface $time: The time service.

File

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

Class

ContentTranslationHandler
Base class for content translation handlers.

Namespace

Drupal\content_translation

Code

public function __construct(EntityTypeInterface $entityType, LanguageManagerInterface $languageManager, ContentTranslationManagerInterface $manager, EntityTypeManagerInterface $entityTypeManager, AccountInterface $currentUser, MessengerInterface $messenger, DateFormatterInterface $dateFormatter, EntityLastInstalledSchemaRepositoryInterface $entity_last_installed_schema_repository, RedirectDestinationInterface $redirectDestination, TimeInterface $time) {
    $this->entityTypeId = $entityType->id();
    $this->fieldStorageDefinitions = $entity_last_installed_schema_repository->getLastInstalledFieldStorageDefinitions($this->entityTypeId);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal