You are here

protected function ViewRevisionsRequest::routeExists in Config Entity Revisions 8.2

Check if route exists.

Parameters

string $name: Route name.

Return value

bool TRUE if the route exists.

See also

http://drupal.stackexchange.com/questions/222591/how-do-i-verify-a-route...

1 call to ViewRevisionsRequest::routeExists()
ViewRevisionsRequest::hasSourceEntityViewRoutes in modules/view_revisions/src/ViewRevisionsRequest.php

File

modules/view_revisions/src/ViewRevisionsRequest.php, line 250

Class

ViewRevisionsRequest
Handles view requests.

Namespace

Drupal\view_revisions

Code

protected function routeExists($name) {
  try {
    $this->routeProvider
      ->getRouteByName($name);
    return TRUE;
  } catch (\Exception $exception) {
    return FALSE;
  }
}