You are here

public function NodeTranslationExceptionSubscriber::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 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()

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;
}