function DeprecatedCsrfTokenController::__construct

Same name in other branches
  1. 8.9.x 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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.