You are here

public function DxprThemeSettingsThemeNegotiator::applies in DXPR Theme Helper 1.0.x

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

src/Theme/DxprThemeSettingsThemeNegotiator.php, line 16

Class

DxprThemeSettingsThemeNegotiator
Forces theme settings forms to use the Theme that is being configured

Namespace

Drupal\dxpr_theme_helper\Theme

Code

public function applies(RouteMatchInterface $route_match) {
  $route = $route_match
    ->getRouteObject();
  return $route && $route
    ->getPath() == '/admin/appearance/settings/{theme}';
}