You are here

public function CorsResponseEventSubscriber::__construct in CORS 8

Constructs a new CORS response event subscriber.

Parameters

ConfigFactoryInterface $config_factory: The config factory.

\Drupal\Core\Path\AliasManagerInterface $alias_manager: The alias manager.

\Drupal\Core\Path\PathMatcherInterface $path_matcher: The path matcher.

File

src/EventSubscriber/CorsResponseEventSubscriber.php, line 53
Contains Drupal\cors\EventSubscriber\CorsResponseEventSubscriber

Class

CorsResponseEventSubscriber
Response Event Subscriber for adding CORS headers.

Namespace

Drupal\cors\EventSubscriber

Code

public function __construct(ConfigFactoryInterface $config_factory, AliasManagerInterface $alias_manager, PathMatcherInterface $path_matcher) {
  $this->config = $config_factory
    ->get('cors.settings');
  $this->aliasManager = $alias_manager;
  $this->pathMatcher = $path_matcher;
}