You are here

public function AdminDemoNegotiator::determineActiveTheme in Drupal 9

Same name and namespace in other branches
  1. 8 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 The name of the theme, or NULL if other negotiators, like the configured default one, should be used instead.

Overrides ThemeNegotiatorInterface::determineActiveTheme

File

core/modules/block/src/Theme/AdminDemoNegotiator.php, line 23

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');
}