You are here

public function ClientTestForm::__construct in OAuth2 Client 8.2

Constructs a ClientTestForm object.

Parameters

\Symfony\Component\HttpFoundation\RequestStack $requestStack: The request stack.

\Drupal\Core\TempStore\PrivateTempStoreFactory $tempstoreFactory: The Drupal private tempstore factory.

\Drupal\Core\Routing\UrlGeneratorInterface $urlGenerator: The URL generator service.

\Drupal\oauth2_client\PluginManager\Oauth2ClientPluginManagerInterface $oauth2ClientPluginManager: The OAuth2 Client plugin manager.

\Drupal\oauth2_client\Service\Oauth2ClientServiceInterface $oauth2ClientService: The OAuth2 client service.

\Drupal\Core\Routing\RouteMatchInterface $currentRouteMatch: Current route match.

File

src/Form/ClientTestForm.php, line 72

Class

ClientTestForm
Defines the form for testing OAuth2 Client integrations.

Namespace

Drupal\oauth2_client\Form

Code

public function __construct(RequestStack $requestStack, PrivateTempStoreFactory $tempstoreFactory, UrlGeneratorInterface $urlGenerator, Oauth2ClientPluginManagerInterface $oauth2ClientPluginManager, Oauth2ClientServiceInterface $oauth2ClientService, RouteMatchInterface $currentRouteMatch) {
  $this->currentRequest = $requestStack
    ->getCurrentRequest();
  $this->tempstore = $tempstoreFactory
    ->get('oauth2_client');
  $this->urlGenerator = $urlGenerator;
  $this->oauth2ClientPluginManager = $oauth2ClientPluginManager;
  $this->oauth2ClientService = $oauth2ClientService;
  $this->routeMatch = $currentRouteMatch;
}