Jarves\Router\RestApiLoader::addEntryPointRoutes PHP Метод

addEntryPointRoutes() публичный Метод

public addEntryPointRoutes ( RouteCollection $routes, $pattern, Object $object )
$routes Symfony\Component\Routing\RouteCollection
$object Jarves\Configuration\Object
    public function addEntryPointRoutes(RouteCollection $routes, $pattern, Object $object)
    {
        $objectName = $object->getBundle()->getName() . '/' . lcfirst($object->getId());
        //        $routeName = 'jarves_entrypoint_' . str_replace('/', '_', $pattern) . strtolower($object->getBundle()->getName() . '_' . $object->getId());
        /** @var $route \Symfony\Component\Routing\Route */
        foreach ($routes as $name => $route) {
            $method = explode('::', $route->getDefault('_controller'))[1];
            $path = '%jarves_admin_prefix%/' . $pattern . $route->getPath();
            $route->setPath($path);
            $route->setDefault('_jarves_object', $objectName);
            $route->setDefault('_jarves_entry_point', $pattern);
            $this->setupObjectRouteRequirements($route, $object);
            $name = str_replace('/', '_', $pattern . $route->getPath()) . '_' . $method;
            $this->routes->add($name, $route);
        }
    }