AdminDemoNegotiator::determineActiveTheme

public AdminDemoNegotiator::determineActiveTheme(RouteMatchInterface $route_match)

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');
}
doc_Drupal
2016-10-29 08:43:41
Comments
Leave a Comment

Please login to continue.