You are here

protected function VisualDiffThemeNegotiator::isDiffRoute in Diff 8

Checks if route names for node or other entity are corresponding.

Parameters

\Drupal\Core\Routing\RouteMatchInterface $route_match: Route match object.

Return value

bool Return TRUE if route name is ok.

1 call to VisualDiffThemeNegotiator::isDiffRoute()
VisualDiffThemeNegotiator::applies in src/VisualDiffThemeNegotiator.php
Whether this theme negotiator should be used to set the theme.

File

src/VisualDiffThemeNegotiator.php, line 68

Class

VisualDiffThemeNegotiator
Visual inline layout theme negotiator.

Namespace

Drupal\diff

Code

protected function isDiffRoute(RouteMatchInterface $route_match) {
  $regex_pattern = '/^entity\\..*\\.revisions_diff$/';
  return $route_match
    ->getRouteName() === 'diff.revisions_diff' || preg_match($regex_pattern, $route_match
    ->getRouteName());
}