You are here

public function AjaxBasePageNegotiator::applies in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Theme/AjaxBasePageNegotiator.php \Drupal\Core\Theme\AjaxBasePageNegotiator::applies()

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 74
Contains \Drupal\Core\Theme\AjaxBasePageNegotiator.

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';
}