You are here

public static function CspSubscriber::getSubscribedEvents in Googalytics - Google Analytics 8

File

src/EventSubscriber/CspSubscriber.php, line 19

Class

CspSubscriber
Alter CSP policy for Google Analytics.

Namespace

Drupal\ga\EventSubscriber

Code

public static function getSubscribedEvents() {
  if (!class_exists(CspEvents::class)) {
    return [];
  }
  $events[CspEvents::POLICY_ALTER] = [
    'onCspPolicyAlter',
  ];
  return $events;
}