You are here

public static function OpenIDConnectRedirectController::create in OpenID Connect / OAuth client 2.x

Same name and namespace in other branches
  1. 8 src/Controller/OpenIDConnectRedirectController.php \Drupal\openid_connect\Controller\OpenIDConnectRedirectController::create()

Instantiates a new instance of this class.

This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton.

Parameters

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

Overrides ContainerInjectionInterface::create

File

src/Controller/OpenIDConnectRedirectController.php, line 151

Class

OpenIDConnectRedirectController
Redirect controller.

Namespace

Drupal\openid_connect\Controller

Code

public static function create(ContainerInterface $container) : OpenIDConnectRedirectController {
  return new static($container
    ->get('openid_connect.openid_connect'), $container
    ->get('openid_connect.state_token'), $container
    ->get('request_stack'), $container
    ->get('openid_connect.session'), $container
    ->get('config.factory'), $container
    ->get('externalauth.authmap'), $container
    ->get('current_user'), $container
    ->get('module_handler'), $container
    ->get('language_manager'), $container
    ->get('entity_type.manager'));
}