You are here

public function MergeTranslationsForm::__construct in Merge translations 8

MergeTranslationsForm constructor.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: EntityTypeManager.

\Drupal\Core\Routing\RouteMatchInterface $routeMatch: RouteMatch.

\Drupal\Core\Language\LanguageManagerInterface $languages: Language.

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

\Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler: ModuleHandler.

\Drupal\Core\Session\AccountProxyInterface $currentUser: Current user.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

File

src/Form/MergeTranslationsForm.php, line 109

Class

MergeTranslationsForm
The merge translation form.

Namespace

Drupal\merge_translations\Form

Code

public function __construct(EntityTypeManagerInterface $entityTypeManager, RouteMatchInterface $routeMatch, LanguageManagerInterface $languages, MessengerInterface $messenger, ModuleHandlerInterface $moduleHandler, AccountProxyInterface $currentUser) {
  $this->entityTypeManager = $entityTypeManager;
  $this->routeMatch = $routeMatch;
  $this->languages = $languages;
  $this->messenger = $messenger;
  $this->moduleHandler = $moduleHandler;
  $this->currentUser = $currentUser;
  $this->node = $entityTypeManager
    ->getStorage(self::ENTITYTYPE)
    ->load($routeMatch
    ->getParameter(self::ENTITYTYPE));
}