function CsrfTokenController::__construct
Same name in other branches
- 8.9.x core/modules/system/src/Controller/CsrfTokenController.php \Drupal\system\Controller\CsrfTokenController::__construct()
- 10 core/modules/system/src/Controller/CsrfTokenController.php \Drupal\system\Controller\CsrfTokenController::__construct()
- 11.x core/modules/system/src/Controller/CsrfTokenController.php \Drupal\system\Controller\CsrfTokenController::__construct()
Constructs a new CsrfTokenController object.
Parameters
\Drupal\Core\Access\CsrfTokenGenerator $token_generator: The CSRF token generator.
File
-
core/
modules/ system/ src/ Controller/ CsrfTokenController.php, line 29
Class
- CsrfTokenController
- Returns responses for CSRF token routes.
Namespace
Drupal\system\ControllerCode
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.