You are here

public function GDPRController::__construct in General Data Protection Regulation 8.2

Same name in this branch
  1. 8.2 modules/gdpr_fields/src/Controller/GDPRController.php \Drupal\gdpr_fields\Controller\GDPRController::__construct()
  2. 8.2 modules/gdpr_tasks/src/Controller/GDPRController.php \Drupal\gdpr_tasks\Controller\GDPRController::__construct()
Same name and namespace in other branches
  1. 8 modules/gdpr_fields/src/Controller/GDPRController.php \Drupal\gdpr_fields\Controller\GDPRController::__construct()
  2. 3.0.x modules/gdpr_fields/src/Controller/GDPRController.php \Drupal\gdpr_fields\Controller\GDPRController::__construct()

Constructs a new GDPRController.

Parameters

\Drupal\gdpr_fields\GDPRCollector $collector: The GDPR collector service.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: HTTP Request stack.

File

modules/gdpr_fields/src/Controller/GDPRController.php, line 45

Class

GDPRController
Returns responses for GDPR Field routes.

Namespace

Drupal\gdpr_fields\Controller

Code

public function __construct(GDPRCollector $collector, RequestStack $request_stack) {
  $this->collector = $collector;
  $this->request = $request_stack
    ->getCurrentRequest();
}