function CsrfAccessCheck::__construct
Same name in other branches
- 9 core/lib/Drupal/Core/Access/CsrfAccessCheck.php \Drupal\Core\Access\CsrfAccessCheck::__construct()
- 8.9.x core/lib/Drupal/Core/Access/CsrfAccessCheck.php \Drupal\Core\Access\CsrfAccessCheck::__construct()
- 10 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 40
Class
- CsrfAccessCheck
- Access protection against CSRF attacks.
Namespace
Drupal\Core\AccessCode
public function __construct(CsrfTokenGenerator $csrf_token) {
$this->csrfToken = $csrf_token;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.