function LazyRouteCollection::get
Same name in other branches
- 9 core/lib/Drupal/Core/Routing/LazyRouteCollection.php \Drupal\Core\Routing\LazyRouteCollection::get()
- 10 core/lib/Drupal/Core/Routing/LazyRouteCollection.php \Drupal\Core\Routing\LazyRouteCollection::get()
Gets a route by name.
Parameters
string $name: The route name
Return value
\Symfony\Component\Routing\Route|null A Route instance or null when not found
File
-
core/
lib/ Drupal/ Core/ Routing/ LazyRouteCollection.php, line 60
Class
Namespace
Drupal\Core\RoutingCode
public function get($name) : ?Route {
try {
return $this->provider
->getRouteByName($name);
} catch (RouteNotFoundException) {
return NULL;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.