You are here

public function AdminDemoNegotiator::determineActiveTheme in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/block/src/Theme/AdminDemoNegotiator.php \Drupal\block\Theme\AdminDemoNegotiator::determineActiveTheme()

Determine the active theme for the request.

Parameters

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

Return value

string|null Returns the active theme name, else return NULL.

Overrides ThemeNegotiatorInterface::determineActiveTheme

File

core/modules/block/src/Theme/AdminDemoNegotiator.php, line 28
Contains \Drupal\block\Theme\AdminDemoNegotiator.

Class

AdminDemoNegotiator
Negotiates the theme for the block admin demo page via the URL.

Namespace

Drupal\block\Theme

Code

public function determineActiveTheme(RouteMatchInterface $route_match) {

  // We return exactly what was passed in, to guarantee that the page will
  // always be displayed using the theme whose blocks are being configured.
  return $route_match
    ->getParameter('theme');
}