You are here

public function SchedulerThemeNegotiator::determineActiveTheme in Scheduler 8

Same name and namespace in other branches
  1. 2.x src/Theme/SchedulerThemeNegotiator.php \Drupal\scheduler\Theme\SchedulerThemeNegotiator::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/SchedulerThemeNegotiator.php, line 25

Class

SchedulerThemeNegotiator
Defines a theme negotiator for the Scheduler routes.

Namespace

Drupal\scheduler\Theme

Code

public function determineActiveTheme(RouteMatchInterface $route_match) {

  // Return the admin theme.
  $config = \Drupal::service('config.factory')
    ->getEditable('system.theme');
  $admin_theme = $config
    ->get('admin');
  return $admin_theme;
}