class AdminDemoNegotiator in Drupal 10
Same name and namespace in other branches
- 8 core/modules/block/src/Theme/AdminDemoNegotiator.php \Drupal\block\Theme\AdminDemoNegotiator
- 9 core/modules/block/src/Theme/AdminDemoNegotiator.php \Drupal\block\Theme\AdminDemoNegotiator
Negotiates the theme for the block admin demo page via the URL.
Hierarchy
- class \Drupal\block\Theme\AdminDemoNegotiator implements \Drupal\Core\Theme\ThemeNegotiatorInterface
Expanded class hierarchy of AdminDemoNegotiator
1 string reference to 'AdminDemoNegotiator'
- block.services.yml in core/
modules/ block/ block.services.yml - core/modules/block/block.services.yml
1 service uses AdminDemoNegotiator
- theme.negotiator.block.admin_demo in core/
modules/ block/ block.services.yml - Drupal\block\Theme\AdminDemoNegotiator
File
- core/
modules/ block/ src/ Theme/ AdminDemoNegotiator.php, line 11
Namespace
Drupal\block\ThemeView source
class AdminDemoNegotiator implements ThemeNegotiatorInterface {
/**
* {@inheritdoc}
*/
public function applies(RouteMatchInterface $route_match) {
return $route_match
->getRouteName() == 'block.admin_demo';
}
/**
* {@inheritdoc}
*/
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');
}
}