You are here

public function AmpNegotiator::determineActiveTheme in Accelerated Mobile Pages (AMP) 8

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

Determine the active theme for the request.

Parameters

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

Return value

string|null The name of the theme, or NULL if other negotiators, like the configured default one, should be used instead.

Overrides ThemeNegotiatorInterface::determineActiveTheme

File

src/Theme/AmpNegotiator.php, line 64
Contains \Drupal\amp\Theme\AmpNegotiator.

Class

AmpNegotiator
Sets the active theme on amp pages.

Namespace

Drupal\amp\Theme

Code

public function determineActiveTheme(RouteMatchInterface $route_match) {
  return $this->configFactory
    ->get('amp.theme')
    ->get('amptheme');
}