You are here

class HighPriorityThemeNegotiator in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/theme_test/src/Theme/HighPriorityThemeNegotiator.php \Drupal\theme_test\Theme\HighPriorityThemeNegotiator
  2. 10 core/modules/system/tests/modules/theme_test/src/Theme/HighPriorityThemeNegotiator.php \Drupal\theme_test\Theme\HighPriorityThemeNegotiator

Implements a test theme negotiator which was configured with a high priority.

Hierarchy

Expanded class hierarchy of HighPriorityThemeNegotiator

1 string reference to 'HighPriorityThemeNegotiator'
theme_test.services.yml in core/modules/system/tests/modules/theme_test/theme_test.services.yml
core/modules/system/tests/modules/theme_test/theme_test.services.yml
1 service uses HighPriorityThemeNegotiator
theme.negotiator.high_priority in core/modules/system/tests/modules/theme_test/theme_test.services.yml
Drupal\theme_test\Theme\HighPriorityThemeNegotiator

File

core/modules/system/tests/modules/theme_test/src/Theme/HighPriorityThemeNegotiator.php, line 11

Namespace

Drupal\theme_test\Theme
View source
class HighPriorityThemeNegotiator implements ThemeNegotiatorInterface {

  /**
   * {@inheritdoc}
   */
  public function applies(RouteMatchInterface $route_match) {
    return $route_match
      ->getRouteName() == 'theme_test.priority';
  }

  /**
   * {@inheritdoc}
   */
  public function determineActiveTheme(RouteMatchInterface $route_match) {
    return 'classy';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
HighPriorityThemeNegotiator::applies public function Whether this theme negotiator should be used to set the theme. Overrides ThemeNegotiatorInterface::applies
HighPriorityThemeNegotiator::determineActiveTheme public function Determine the active theme for the request. Overrides ThemeNegotiatorInterface::determineActiveTheme