class HighPriorityThemeNegotiator in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/theme_test/src/Theme/HighPriorityThemeNegotiator.php \Drupal\theme_test\Theme\HighPriorityThemeNegotiator
- 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
- class \Drupal\theme_test\Theme\HighPriorityThemeNegotiator implements ThemeNegotiatorInterface
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\ThemeView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
HighPriorityThemeNegotiator:: |
public | function |
Whether this theme negotiator should be used to set the theme. Overrides ThemeNegotiatorInterface:: |
|
HighPriorityThemeNegotiator:: |
public | function |
Determine the active theme for the request. Overrides ThemeNegotiatorInterface:: |