public function ProtectedPagesSubscriber::__construct in Protected Pages 8
Constructs a new ProtectedPagesSubscriber.
Parameters
\Drupal\path_alias\AliasManager $aliasManager: The path alias manager.
\Drupal\Core\Session\AccountProxy $currentUser: The account proxy service.
\Drupal\Core\Path\CurrentPathStack $currentPathStack: The current path stack service.
\Drupal\Core\Routing\RedirectDestination $destination: The redirect destination service.
\Symfony\Component\HttpFoundation\RequestStack $requestStack: The request stack service.
\Drupal\protected_pages\ProtectedPagesStorage $protectedPagesStorage: The request stack service.
\Drupal\Core\PageCache\ResponsePolicy\KillSwitch $pageCacheKillSwitch: The cache kill switch service.
File
- src/
EventSubscriber/ ProtectedPagesSubscriber.php, line 90
Class
- ProtectedPagesSubscriber
- Redirects user to protected page login screen.
Namespace
Drupal\protected_pages\EventSubscriberCode
public function __construct(AliasManager $aliasManager, AccountProxy $currentUser, CurrentPathStack $currentPathStack, RedirectDestination $destination, RequestStack $requestStack, ProtectedPagesStorage $protectedPagesStorage, KillSwitch $pageCacheKillSwitch) {
$this->aliasManager = $aliasManager;
$this->currentUser = $currentUser;
$this->currentPath = $currentPathStack;
$this->destination = $destination;
$this->requestStack = $requestStack;
$this->protectedPagesStorage = $protectedPagesStorage;
$this->pageCacheKillSwitch = $pageCacheKillSwitch;
}