private function createRouteDefinition($routeName, Route $route)
    {
        if (null === $definition = $this->findRouteDefinitionByRouteName($routeName)) {
            $definition = new RouteDefinition($routeName, $this->resolveRouteOptions($route, $routeName));
            if (null === $parentRouteName = $definition->getParentRouteName()) {
                // If parent route name is null => home page child
                $definition->setParentRouteName($this->homeRouteName);
                $this->homeDefinition->appendChild($definition);
            } else {
                // Creates parent route definition if needed
                $parentRoute = $this->findRouteByName($parentRouteName);
                $parentDefinition = $this->createRouteDefinition($parentRouteName, $parentRoute);
                $parentDefinition->appendChild($definition);
            }
        }

        return $definition;
    }
private function createRouteDefinition($routeName, Route $route)
    {
        if (null === $definition = $this->findRouteDefinitionByRouteName($routeName)) {
            $definition = new RouteDefinition($routeName, $this->resolveRouteOptions($route, $routeName));
            if (null === $parentRouteName = $definition->getParentRouteName()) {
                // If parent route name is null => home page child
                $definition->setParentRouteName($this->homeRouteName);
                $this->homeDefinition->appendChild($definition);
            } else {
                // Creates parent route definition if needed
                $parentRoute = $this->findRouteByName($parentRouteName);
                $parentDefinition = $this->createRouteDefinition($parentRouteName, $parentRoute);
                $parentDefinition->appendChild($definition);
            }
        }

        return $definition;
    }
private function createRouteDefinition ( $ routeName , Route $ route ) { if ( null === $ definition = $ this -> findRouteDefinitionByRouteName ( $ routeName ) ) { $ definition = new RouteDefinition ( $ routeName , $ this -> resolveRouteOptions ( $ route , $ routeName ) ) ; if ( null === $ parentRouteName = $ definition -> getParentRouteName ( ) ) { // If parent route name is null => home page child $ definition -> setParentRouteName ( $ this -> homeRouteName ) ; $ this -> homeDefinition -> appendChild ( $ definition ) ; } else { // Creates parent route definition if needed $ parentRoute = $ this -> findRouteByName ( $ parentRouteName ) ; $ parentDefinition = $ this -> createRouteDefinition ( $ parentRouteName , $ parentRoute ) ; $ parentDefinition -> appendChild ( $ definition ) ; } } return $ definition ; }
Creates a route definition

@param string                           $routeName
@param \Symfony\Component\Routing\Route $route

@return RouteDefinition
Creates a route definition