public function findRoute($routeName)
    {
        // TODO create a route finder ? (same in CmsBundle BreadcrumbBuilder)
        $i18nRouterClass = 'JMS\I18nRoutingBundle\Router\I18nRouterInterface';
        if (interface_exists($i18nRouterClass) && $this->router instanceof $i18nRouterClass) {
            $route = $this->router->getOriginalRouteCollection()->get($routeName);
        } else {
            $route = $this->router->getRouteCollection()->get($routeName);
        }
        if (null === $route) {
            throw new \RuntimeException(sprintf('Route "%s" not found.', $routeName));
        }
        return $route;
    }
public function findRoute($routeName)
    {
        // TODO create a route finder ? (same in CmsBundle BreadcrumbBuilder)
        $i18nRouterClass = 'JMS\I18nRoutingBundle\Router\I18nRouterInterface';
        if (interface_exists($i18nRouterClass) && $this->router instanceof $i18nRouterClass) {
            $route = $this->router->getOriginalRouteCollection()->get($routeName);
        } else {
            $route = $this->router->getRouteCollection()->get($routeName);
        }
        if (null === $route) {
            throw new \RuntimeException(sprintf('Route "%s" not found.', $routeName));
        }
        return $route;
    }
public function findRoute ( $ routeName ) { // TODO create a route finder ? (same in CmsBundle BreadcrumbBuilder) $ i18nRouterClass = 'JMS\I18nRoutingBundle\Router\I18nRouterInterface' ; if ( interface_exists ( $ i18nRouterClass ) && $ this -> router instanceof $ i18nRouterClass ) { $ route = $ this -> router -> getOriginalRouteCollection ( ) -> get ( $ routeName ) ; } else { $ route = $ this -> router -> getRouteCollection ( ) -> get ( $ routeName ) ; } if ( null === $ route ) { throw new \ RuntimeException ( sprintf ( 'Route "%s" not found.' , $ routeName ) ) ; } return $ route ; }
Finds the route definition.

@param string $routeName
@return null|\Symfony\Component\Routing\Route
Finds the route definition .