class AdminDemoNegotiator
Same name in other branches
- 9 core/modules/block/src/Theme/AdminDemoNegotiator.php \Drupal\block\Theme\AdminDemoNegotiator
- 8.9.x core/modules/block/src/Theme/AdminDemoNegotiator.php \Drupal\block\Theme\AdminDemoNegotiator
- 10 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');
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
AdminDemoNegotiator::applies | public | function | Whether this theme negotiator should be used to set the theme. | Overrides ThemeNegotiatorInterface::applies |
AdminDemoNegotiator::determineActiveTheme | public | function | Determine the active theme for the request. | Overrides ThemeNegotiatorInterface::determineActiveTheme |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.