You are here

public function AgreementSubscriber::__construct in Agreement 8.2

Same name and namespace in other branches
  1. 3.0.x src/EventSubscriber/AgreementSubscriber.php \Drupal\agreement\EventSubscriber\AgreementSubscriber::__construct()

Initialize method.

Parameters

\Drupal\agreement\AgreementHandlerInterface $agreementHandler: The agreement handler.

\Drupal\Core\Path\CurrentPathStack $pathStack: The current path.

\Drupal\Core\Session\SessionManagerInterface $sessionManager: The session manager service.

\Drupal\Core\Session\AccountProxyInterface $account: The current user account.

File

src/EventSubscriber/AgreementSubscriber.php, line 61

Class

AgreementSubscriber
Checks if the current user is required to accept an agreement.

Namespace

Drupal\agreement\EventSubscriber

Code

public function __construct(AgreementHandlerInterface $agreementHandler, CurrentPathStack $pathStack, SessionManagerInterface $sessionManager, AccountProxyInterface $account) {
  $this->handler = $agreementHandler;
  $this->pathStack = $pathStack;
  $this->sessionManager = $sessionManager;
  $this->account = $account;
}