src/Sulu/Bundle/RouteBundle/Controller/RouteController.php
private function findRoutes($history, $entityClass, $entityId, $locale)
    {
        /** @var RouteRepositoryInterface $routeRespository */
        $routeRespository = $this->get('sulu.repository.route');

        if ($history) {
            return $routeRespository->findHistoryByEntity($entityClass, $entityId, $locale);
        }

        return [$routeRespository->findByEntity($entityClass, $entityId, $locale)];
    }
private function findRoutes($history, $entityClass, $entityId, $locale)
    {
        /** @var RouteRepositoryInterface $routeRespository */
        $routeRespository = $this->get('sulu.repository.route');

        if ($history) {
            return $routeRespository->findHistoryByEntity($entityClass, $entityId, $locale);
        }

        return [$routeRespository->findByEntity($entityClass, $entityId, $locale)];
    }
private function findRoutes ( $ history , $ entityClass , $ entityId , $ locale ) { /** @var RouteRepositoryInterface $routeRespository */ $ routeRespository = $ this -> get ( 'sulu.repository.route' ) ; if ( $ history ) { return $ routeRespository -> findHistoryByEntity ( $ entityClass , $ entityId , $ locale ) ; } return [ $ routeRespository -> findByEntity ( $ entityClass , $ entityId , $ locale ) ] ; }
Find routes with given parameters.

@param bool $history
@param string $entityClass
@param string $entityId
@param string $locale

@return RouteInterface|RouteInterface[]
Find routes with given parameters .