You are here

public function PolicyAlterEvent::__construct in Content-Security-Policy 8

Create a new PolicyAlterEvent instance.

Parameters

\Drupal\csp\Csp $policy: A CSP policy.

\Symfony\Component\HttpFoundation\Response $response: The Response the policy is being applied to.

File

src/Event/PolicyAlterEvent.php, line 36

Class

PolicyAlterEvent
Event for altering a response CSP Policy.

Namespace

Drupal\csp\Event

Code

public function __construct(Csp $policy, Response $response) {
  $this->policy = $policy;
  $this->response = $response;
}