public function node2Scope(SiteTreeNodeInterface $node){

        $scope = new TreeScope();
        $urlSegment = trim($node->getUrlSegment(),'/');

        $name = $urlSegment ? $urlSegment : TreeScope::DEFAULT_NAME;

        $scope->setPathPrefix($node->getUrlSegment());
        $scope->setName($name);
        $scope->setTitle($node->getMenuTitle());
        $scope->setModelRootId($node->{$this->treeModel->rootCol()});

        return $scope;

    }
public function node2Scope(SiteTreeNodeInterface $node){

        $scope = new TreeScope();
        $urlSegment = trim($node->getUrlSegment(),'/');

        $name = $urlSegment ? $urlSegment : TreeScope::DEFAULT_NAME;

        $scope->setPathPrefix($node->getUrlSegment());
        $scope->setName($name);
        $scope->setTitle($node->getMenuTitle());
        $scope->setModelRootId($node->{$this->treeModel->rootCol()});

        return $scope;

    }
public function node2Scope ( SiteTreeNodeInterface $ node ) { $ scope = new TreeScope ( ) ; $ urlSegment = trim ( $ node -> getUrlSegment ( ) , '/' ) ; $ name = $ urlSegment ? $ urlSegment : TreeScope :: DEFAULT_NAME ; $ scope -> setPathPrefix ( $ node -> getUrlSegment ( ) ) ; $ scope -> setName ( $ name ) ; $ scope -> setTitle ( $ node -> getMenuTitle ( ) ) ; $ scope -> setModelRootId ( $ node -> { $ this -> treeModel -> rootCol ( ) } ) ; return $ scope ; }
Convert a root node to a scope

@param \Cmsable\Model\SiteTreeNodeInterface $node
@return \Cmsable\Routing\TreeScope\TreeScope
Convert a root node to a scope