You are here

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

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

Construct a new amp context helper instance.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $configFactory: The config factory.

\Drupal\Core\Theme\ThemeManager $themeManager: The theme manager.

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

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

\Drupal\Core\Routing\AdminContext $adminContext: The admin route context.

File

src/Routing/AmpContext.php, line 68

Class

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

Namespace

Drupal\amp\Routing

Code

public function __construct(ConfigFactoryInterface $configFactory, ThemeManager $themeManager, EntityTypeInfo $entityTypeInfo, RouteMatchInterface $routeMatch, AdminContext $adminContext) {
  $this->configFactory = $configFactory;
  $this->themeManager = $themeManager;
  $this->entityTypeInfo = $entityTypeInfo;
  $this->routeMatch = $routeMatch;
  $this->adminContext = $adminContext;
}