You are here

public function PreviewLinkCanonicalRerouteAccessCheck::__construct in Preview Link 2.x

Same name and namespace in other branches
  1. 2.0.x src/Access/PreviewLinkCanonicalRerouteAccessCheck.php \Drupal\preview_link\Access\PreviewLinkCanonicalRerouteAccessCheck::__construct()

PreviewLinkCanonicalRerouteAccessCheck constructor.

Parameters

\Drupal\Core\TempStore\PrivateTempStoreFactory $privateTempStoreFactory: Private temp store factory.

\Drupal\preview_link\PreviewLinkHostInterface $previewLinkHost: Preview link host service.

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

File

src/Access/PreviewLinkCanonicalRerouteAccessCheck.php, line 57

Class

PreviewLinkCanonicalRerouteAccessCheck
Reroutes users from a canonical route to preview link route.

Namespace

Drupal\preview_link\Access

Code

public function __construct(PrivateTempStoreFactory $privateTempStoreFactory, PreviewLinkHostInterface $previewLinkHost, CurrentRouteMatch $routeMatch) {
  $this->privateTempStoreFactory = $privateTempStoreFactory;
  $this->previewLinkHost = $previewLinkHost;
  $this->routeMatch = $routeMatch;
}