You are here

public function DomainRedirectEventSubscriber::__construct in Domain 301 Redirect 8

Constructs a DomainRedirectEventSubscriber object.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: Config factory object.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.

\Drupal\Core\Session\AccountProxyInterface $user_account: The current user object.

\Drupal\Core\Path\PathMatcherInterface $path_matcher: Path Matcher interface.

\Drupal\Core\Path\AliasManagerInterface $pathAliasManager: Path alias manager interface.

File

src/EventSubscriber/DomainRedirectEventSubscriber.php, line 74

Class

DomainRedirectEventSubscriber
Class DomainRedirectEventSubscriber.

Namespace

Drupal\domain_301_redirect\EventSubscriber

Code

public function __construct(ConfigFactoryInterface $config_factory, RequestStack $request_stack, AccountProxyInterface $user_account, PathMatcherInterface $path_matcher, AliasManagerInterface $pathAliasManager) {
  $this->config = $config_factory
    ->get('domain_301_redirect.settings');
  $this->request = $request_stack
    ->getCurrentRequest();
  $this->userAccount = $user_account;
  $this->pathMatcher = $path_matcher;
  $this->pathAliasManager = $pathAliasManager;
}