function NodeTranslationExceptionSubscriber::__construct

Same name in other branches
  1. 8.9.x core/modules/node/src/EventSubscriber/NodeTranslationExceptionSubscriber.php \Drupal\node\EventSubscriber\NodeTranslationExceptionSubscriber::__construct()
  2. 10 core/modules/node/src/EventSubscriber/NodeTranslationExceptionSubscriber.php \Drupal\node\EventSubscriber\NodeTranslationExceptionSubscriber::__construct()
  3. 11.x core/modules/node/src/EventSubscriber/NodeTranslationExceptionSubscriber.php \Drupal\node\EventSubscriber\NodeTranslationExceptionSubscriber::__construct()

Constructs the NodeTranslationExceptionSubscriber.

Parameters

\Drupal\Core\KeyValueStore\KeyValueFactoryInterface $key_value: The key value factory.

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

\Drupal\Core\Routing\UrlGeneratorInterface $url_generator: The URL generator.

\Drupal\Core\State\StateInterface $state: The state service.

File

core/modules/node/src/EventSubscriber/NodeTranslationExceptionSubscriber.php, line 73

Class

NodeTranslationExceptionSubscriber
Redirect node translations that have been consolidated by migration.

Namespace

Drupal\node\EventSubscriber

Code

public function __construct(KeyValueFactoryInterface $key_value, LanguageManagerInterface $language_manager, UrlGeneratorInterface $url_generator, StateInterface $state) {
    $this->keyValue = $key_value;
    $this->languageManager = $language_manager;
    $this->urlGenerator = $url_generator;
    $this->state = $state;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.