You are here

protected function ViewRevisionsRequest::routeExists in Config Entity Revisions 8

Same name and namespace in other branches
  1. 1.x modules/views_revisions/src/ViewsRevisionsRequest.php \Drupal\views_revisions\ViewRevisionsRequest::routeExists()

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/views_revisions/src/ViewsRevisionsRequest.php

File

modules/views_revisions/src/ViewsRevisionsRequest.php, line 361

Class

ViewRevisionsRequest
Handles view requests.

Namespace

Drupal\views_revisions

Code

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