You are here

public function R4032LoginSubscriber::__construct in Redirect 403 to User Login 2.x

Same name and namespace in other branches
  1. 8 src/EventSubscriber/R4032LoginSubscriber.php \Drupal\r4032login\EventSubscriber\R4032LoginSubscriber::__construct()

Constructs a new R4032LoginSubscriber.

Parameters

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

\Drupal\Core\Session\AccountInterface $current_user: The current user.

\Drupal\Core\Path\PathMatcherInterface $path_matcher: The path matcher.

\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: The event dispatcher.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger service.

File

src/EventSubscriber/R4032LoginSubscriber.php, line 75

Class

R4032LoginSubscriber
Redirect 403 to User Login event subscriber.

Namespace

Drupal\r4032login\EventSubscriber

Code

public function __construct(ConfigFactoryInterface $config_factory, AccountInterface $current_user, PathMatcherInterface $path_matcher, EventDispatcherInterface $event_dispatcher, MessengerInterface $messenger) {
  $this->configFactory = $config_factory;
  $this->currentUser = $current_user;
  $this->pathMatcher = $path_matcher;
  $this->eventDispatcher = $event_dispatcher;
  $this->messenger = $messenger;
}