You are here

public function DeprecatedCsrfTokenController::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/csrf_test/src/Controller/DeprecatedCsrfTokenController.php \Drupal\csrf_test\Controller\DeprecatedCsrfTokenController::__construct()

Constructs a new CsrfTokenController object.

Parameters

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

File

core/modules/system/tests/modules/csrf_test/src/Controller/DeprecatedCsrfTokenController.php, line 34

Class

DeprecatedCsrfTokenController
Returns responses for Deprecated CSRF token routes.

Namespace

Drupal\csrf_test\Controller

Code

public function __construct(CsrfTokenGenerator $token_generator) {
  $this->tokenGenerator = $token_generator;
}