You are here

public function AmpContext::__construct in Accelerated Mobile Pages (AMP) 8

Same name and namespace in other branches
  1. 8.3 src/Routing/AmpContext.php \Drupal\amp\Routing\AmpContext::__construct()
  2. 8.2 src/Routing/AmpContext.php \Drupal\amp\Routing\AmpContext::__construct()

Construct a new amp context helper instance.

Parameters

\Drupal\amp\EntityTypeInfo $entity_type_info: Information about AMP-enabled content types.

\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match.

File

src/Routing/AmpContext.php, line 42
Contains \Drupal\amp\Routing\AmpContext.

Class

AmpContext
Provides a helper class to determine whether the route is an amp one.

Namespace

Drupal\amp\Routing

Code

public function __construct(EntityTypeInfo $entity_type_info, RouteMatchInterface $route_match) {
  $this->entityTypeInfo = $entity_type_info;
  $this->routeMatch = $route_match;
}