function RestAuthenticationController::create

Same name and namespace in other branches
  1. 11.x core/modules/rest/src/Controller/RestAuthenticationController.php \Drupal\rest\Controller\RestAuthenticationController::create()

Instantiates a new instance of the implementing class using autowiring.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The service container this instance should use.

Return value

static

Overrides AutowireTrait::create

File

core/modules/rest/src/Controller/RestAuthenticationController.php, line 74

Class

RestAuthenticationController
Provides controllers for login, login status and logout via HTTP requests.

Namespace

Drupal\rest\Controller

Code

public static function create(ContainerInterface $container) : static {
  return new static($container->get('user.flood_control'), $container->get('entity_type.manager'), $container->get('csrf_token'), $container->get('user.auth'), $container->get('router.route_provider'), $container->get('serializer'), $container->getParameter('serializer.formats'), $container->get('logger.factory')
    ->get('rest'));
}

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