function CsrfTokenController::create

Same name in other branches
  1. 8.9.x core/modules/system/src/Controller/CsrfTokenController.php \Drupal\system\Controller\CsrfTokenController::create()
  2. 10 core/modules/system/src/Controller/CsrfTokenController.php \Drupal\system\Controller\CsrfTokenController::create()
  3. 11.x core/modules/system/src/Controller/CsrfTokenController.php \Drupal\system\Controller\CsrfTokenController::create()

Overrides ContainerInjectionInterface::create

File

core/modules/system/src/Controller/CsrfTokenController.php, line 36

Class

CsrfTokenController
Returns responses for CSRF token routes.

Namespace

Drupal\system\Controller

Code

public static function create(ContainerInterface $container) {
    return new static($container->get('csrf_token'));
}

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