You are here

public function CsrfAccessCheck::__construct in Zircon Profile 8.0

Same name in this branch
  1. 8.0 core/lib/Drupal/Core/Access/CsrfAccessCheck.php \Drupal\Core\Access\CsrfAccessCheck::__construct()
  2. 8.0 core/modules/rest/src/Access/CSRFAccessCheck.php \Drupal\rest\Access\CSRFAccessCheck::__construct()
Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Access/CsrfAccessCheck.php \Drupal\Core\Access\CsrfAccessCheck::__construct()

Constructs a CsrfAccessCheck object.

Parameters

\Drupal\Core\Access\CsrfTokenGenerator $csrf_token: The CSRF token generator.

File

core/lib/Drupal/Core/Access/CsrfAccessCheck.php, line 37
Contains \Drupal\Core\Access\CsrfAccessCheck.

Class

CsrfAccessCheck
Allows access to routes to be controlled by a '_csrf_token' parameter.

Namespace

Drupal\Core\Access

Code

public function __construct(CsrfTokenGenerator $csrf_token) {
  $this->csrfToken = $csrf_token;
}