You are here

public function StaticPreviewRequestSubscriber::__construct in Tome 8

Constructs a new StaticPreviewRequestSubscriber object.

Parameters

\Drupal\tome_static\StaticGeneratorInterface $static: The static generator.

\Symfony\Component\HttpFoundation\Session\Session $session: The session.

\Drupal\Core\Routing\CurrentRouteMatch $route_match: The current route match.

File

modules/tome_static/src/EventSubscriber/StaticPreviewRequestSubscriber.php, line 63

Class

StaticPreviewRequestSubscriber
Routes valid requests to the static build.

Namespace

Drupal\tome_static\EventSubscriber

Code

public function __construct(StaticGeneratorInterface $static, Session $session, CurrentRouteMatch $route_match) {
  $this->static = $static;
  $this->session = $session;
  $this->routeMatch = $route_match;
}