public function AmpNegotiator::__construct in Accelerated Mobile Pages (AMP) 8
Same name and namespace in other branches
- 8.3 src/Theme/AmpNegotiator.php \Drupal\amp\Theme\AmpNegotiator::__construct()
- 8.2 src/Theme/AmpNegotiator.php \Drupal\amp\Theme\AmpNegotiator::__construct()
Creates a new AmpNegotiator instance.
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Drupal\amp\Routing\AmpContext $amp_context: The route amp context to determine whether the route is an amp one.
File
- src/
Theme/ AmpNegotiator.php, line 42 - Contains \Drupal\amp\Theme\AmpNegotiator.
Class
- AmpNegotiator
- Sets the active theme on amp pages.
Namespace
Drupal\amp\ThemeCode
public function __construct(ConfigFactoryInterface $config_factory, AmpContext $amp_context) {
$this->configFactory = $config_factory;
$this->ampContext = $amp_context;
}