You are here

public function PageThemeNegotiator::determineActiveTheme in Switch Page Theme 8

Same name and namespace in other branches
  1. 8.3 src/Theme/PageThemeNegotiator.php \Drupal\switch_page_theme\Theme\PageThemeNegotiator::determineActiveTheme()
  2. 8.2 src/Theme/PageThemeNegotiator.php \Drupal\switch_page_theme\Theme\PageThemeNegotiator::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/PageThemeNegotiator.php, line 173

Class

PageThemeNegotiator
Sets the selected theme on specified pages.

Namespace

Drupal\switch_page_theme\Theme

Code

public function determineActiveTheme(RouteMatchInterface $route_match) {

  // Get theme to apply on page.
  global $theme;

  // Return the actual theme name.
  return $theme;
}