You are here

public function AmpEventSubscriber::__construct in Accelerated Mobile Pages (AMP) 8.3

Constructs an AmpEventSubscriber object.

Parameters

Drupal\amp\Routing\AmpContext $ampContext: The AMP context service.

\Drupal\Core\Routing\RouteMatchInterface $routeMatch: The RouteMatch service.

File

src/EventSubscriber/AmpEventSubscriber.php, line 40

Class

AmpEventSubscriber
Redirects AMP requests to ?_wrapper_format=amp if appropriate.

Namespace

Drupal\amp\EventSubscriber

Code

public function __construct(AmpContext $ampContext, RouteMatchInterface $routeMatch) {
  $this->ampContext = $ampContext;
  $this->routeMatch = $routeMatch;
}