You are here

public function GlobalredirectSubscriber::__construct in Global Redirect 8

Constructs a \Drupal\redirect\EventSubscriber\RedirectRequestSubscriber object.

Parameters

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

\Drupal\Core\Path\AliasManager $alias_manager: The alias manager service.

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

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler service.

\Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager service.

\Drupal\globalredirect\RedirectChecker $redirect_checker: The redirect checker service.

\Symfony\Component\Routing\RequestContext: Request context.

File

src/EventSubscriber/GlobalredirectSubscriber.php, line 89
Contains \Drupal\globalredirect\EventSubscriber\GlobalredirectSubscriber.

Class

GlobalredirectSubscriber
KernelEvents::REQUEST subscriber for redirecting q=path/to/page requests.

Namespace

Drupal\globalredirect\EventSubscriber

Code

public function __construct(ConfigFactoryInterface $config_factory, AliasManager $alias_manager, LanguageManagerInterface $language_manager, ModuleHandlerInterface $module_handler, EntityManagerInterface $entity_manager, RedirectChecker $redirect_checker, RequestContext $context) {
  $this->config = $config_factory
    ->get('globalredirect.settings');
  $this->aliasManager = $alias_manager;
  $this->languageManager = $language_manager;
  $this->moduleHandler = $module_handler;
  $this->entityManager = $entity_manager;
  $this->redirectChecker = $redirect_checker;
  $this->context = $context;
}