Get the route by a string name
string $route:
array $parameters:
RouteNotFoundException if there is no route found for the provided name
protected function getRouteByName($name, array $parameters) {
$route = $this->provider
->getRouteByName($name, $parameters);
if (empty($route)) {
throw new RouteNotFoundException('No route found for name: ' . $name);
}
return $this
->getBestLocaleRoute($route, $parameters);
}