You are here

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

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

Creates a new AmpNegotiator instance.

Parameters

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

\Drupal\amp\Routing\AmpContext $ampContext: The AmpContext.

File

src/Theme/AmpNegotiator.php, line 38

Class

AmpNegotiator
Sets the active theme on amp pages.

Namespace

Drupal\amp\Theme

Code

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