You are here

public function RequestSubscriber::__construct in Content Translation Redirect 8

ContentTranslationRedirectRequestSubscriber constructor.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

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

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

\Drupal\Core\Routing\RouteMatchInterface $route_match: The currently active route match object.

File

src/EventSubscriber/RequestSubscriber.php, line 68

Class

RequestSubscriber
Redirect subscriber for controller requests.

Namespace

Drupal\content_translation_redirect\EventSubscriber

Code

public function __construct(ConfigFactoryInterface $config_factory, LanguageManagerInterface $language_manager, EntityTypeManagerInterface $entity_type_manager, RouteMatchInterface $route_match) {
  $this->config = $config_factory
    ->get('content_translation_redirect.default');
  $this->languageManager = $language_manager;
  $this->storage = $entity_type_manager
    ->getStorage('content_translation_redirect');
  $this->routeMatch = $route_match;
}