You are here

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

Constructs a new ResponseSubscriber object.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $configFactory: Config Factory service.

\Drupal\csp\LibraryPolicyBuilder $libraryPolicyBuilder: The Library Parser service.

\Drupal\csp\ReportingHandlerPluginManager $reportingHandlerPluginManager: The Reporting Handler Plugin Manager service.

\Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher: The Event Dispatcher Service.

File

src/EventSubscriber/ResponseCspSubscriber.php, line 63

Class

ResponseCspSubscriber
Class ResponseSubscriber.

Namespace

Drupal\csp\EventSubscriber

Code

public function __construct(ConfigFactoryInterface $configFactory, LibraryPolicyBuilder $libraryPolicyBuilder, ReportingHandlerPluginManager $reportingHandlerPluginManager, EventDispatcherInterface $eventDispatcher) {
  $this->configFactory = $configFactory;
  $this->libraryPolicyBuilder = $libraryPolicyBuilder;
  $this->reportingHandlerPluginManager = $reportingHandlerPluginManager;
  $this->eventDispatcher = $eventDispatcher;
}