public function AjaxBasePageNegotiator::applies

public AjaxBasePageNegotiator::applies(RouteMatchInterface $route_match)

Whether this theme negotiator should be used to set the theme.

Parameters

\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match object.

Return value

bool TRUE if this negotiator should be used or FALSE to let other negotiators decide.

Overrides ThemeNegotiatorInterface::applies

File

core/lib/Drupal/Core/Theme/AjaxBasePageNegotiator.php, line 69

Class

AjaxBasePageNegotiator
Defines a theme negotiator that deals with the active theme on ajax requests.

Namespace

Drupal\Core\Theme

Code

public function applies(RouteMatchInterface $route_match) {
  // Check whether the route was configured to use the base page theme.
  return ($route = $route_match->getRouteObject())
    && $route->hasOption('_theme')
    && $route->getOption('_theme') == 'ajax_base_page';
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Theme!AjaxBasePageNegotiator.php/function/AjaxBasePageNegotiator::applies/8.1.x