You are here

public function AnonymousCsrfAccessCheck::__construct in Anonymous CSRF Token 2.x

Constructs a AnonymousCsrfAccessCheck object.

Parameters

\Drupal\anonymous_token\Access\AnonymousCsrfTokenGenerator $csrf_token: The CSRF token generator.

Overrides CsrfAccessCheck::__construct

File

src/Access/AnonymousCsrfAccessCheck.php, line 27

Class

AnonymousCsrfAccessCheck
Class AnonymousCsrfAccessCheck.

Namespace

Drupal\anonymous_token\Access

Code

public function __construct(AnonymousCsrfTokenGenerator $csrf_token) {

  // We can't pass it to the parent as it's annotated with a class and not an
  // interface so override it here.
  $this->csrfToken = $csrf_token;
}