Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AdminDemoNegotiator.php

class 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\Theme
View 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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal