public function appendChild(RouteDefinition $routeDefinition)
    {
        if ($routeDefinition->getPosition() == 0) {
            $routeDefinition->setPosition(count($this->children));
        }
        $seo = $routeDefinition->getSeo();
        if (!$this->seo['follow'] && $seo['follow']) {
            $seo['follow'] = false;
            $routeDefinition->setSeo($seo);
        }
        if (!$this->seo['index'] && $seo['index']) {
            $seo['index'] = false;
            $routeDefinition->setSeo($seo);
        }
        $routeName = $routeDefinition->getRouteName();
        if (array_key_exists($routeName, $this->children)) {
            throw new \LogicException(sprintf('Route "%s" already exists.', $routeName));
        }
        $this->children[$routeName] = $routeDefinition;

        return $this;
    }
public function appendChild(RouteDefinition $routeDefinition)
    {
        if ($routeDefinition->getPosition() == 0) {
            $routeDefinition->setPosition(count($this->children));
        }
        $seo = $routeDefinition->getSeo();
        if (!$this->seo['follow'] && $seo['follow']) {
            $seo['follow'] = false;
            $routeDefinition->setSeo($seo);
        }
        if (!$this->seo['index'] && $seo['index']) {
            $seo['index'] = false;
            $routeDefinition->setSeo($seo);
        }
        $routeName = $routeDefinition->getRouteName();
        if (array_key_exists($routeName, $this->children)) {
            throw new \LogicException(sprintf('Route "%s" already exists.', $routeName));
        }
        $this->children[$routeName] = $routeDefinition;

        return $this;
    }
public function appendChild ( RouteDefinition $ routeDefinition ) { if ( $ routeDefinition -> getPosition ( ) == 0 ) { $ routeDefinition -> setPosition ( count ( $ this -> children ) ) ; } $ seo = $ routeDefinition -> getSeo ( ) ; if ( ! $ this -> seo [ 'follow' ] && $ seo [ 'follow' ] ) { $ seo [ 'follow' ] = false ; $ routeDefinition -> setSeo ( $ seo ) ; } if ( ! $ this -> seo [ 'index' ] && $ seo [ 'index' ] ) { $ seo [ 'index' ] = false ; $ routeDefinition -> setSeo ( $ seo ) ; } $ routeName = $ routeDefinition -> getRouteName ( ) ; if ( array_key_exists ( $ routeName , $ this -> children ) ) { throw new \ LogicException ( sprintf ( 'Route "%s" already exists.' , $ routeName ) ) ; } $ this -> children [ $ routeName ] = $ routeDefinition ; return $ this ; }
Adds a child route definition

@param RouteDefinition $routeDefinition

@return RouteDefinition
Adds a child route definition