src/Sulu/Bundle/PageBundle/Controller/NodeController.php
public function cgetNodes(Request $request)
    {
        $tree = $this->getBooleanRequestParameter($request, 'tree', false, false);
        $ids = $this->getRequestParameter($request, 'ids');

        if (true === $tree) {
            return $this->getTreeForUuid($request, $this->getRequestParameter($request, 'id', false, null));
        } elseif (null !== $ids) {
            return $this->getNodesByIds($request, $ids);
        }

        $language = $this->getLanguage($request);
        $webspace = $this->getWebspace($request);
        $excludeGhosts = $this->getBooleanRequestParameter($request, 'exclude-ghosts', false, false);

        $parentUuid = $request->get('parentId');
        $depth = $request->get('depth', 1);
        $depth = intval($depth);
        $flat = $request->get('flat', 'true');
        $flat = ('true' === $flat);

        // TODO pagination
        $result = $this->getRepository()->getNodes(
            $parentUuid,
            $webspace,
            $language,
            $depth,
            $flat,
            false,
            $excludeGhosts
        );

        return $this->handleView($this->view($result));
    }
public function cgetNodes(Request $request)
    {
        $tree = $this->getBooleanRequestParameter($request, 'tree', false, false);
        $ids = $this->getRequestParameter($request, 'ids');

        if (true === $tree) {
            return $this->getTreeForUuid($request, $this->getRequestParameter($request, 'id', false, null));
        } elseif (null !== $ids) {
            return $this->getNodesByIds($request, $ids);
        }

        $language = $this->getLanguage($request);
        $webspace = $this->getWebspace($request);
        $excludeGhosts = $this->getBooleanRequestParameter($request, 'exclude-ghosts', false, false);

        $parentUuid = $request->get('parentId');
        $depth = $request->get('depth', 1);
        $depth = intval($depth);
        $flat = $request->get('flat', 'true');
        $flat = ('true' === $flat);

        // TODO pagination
        $result = $this->getRepository()->getNodes(
            $parentUuid,
            $webspace,
            $language,
            $depth,
            $flat,
            false,
            $excludeGhosts
        );

        return $this->handleView($this->view($result));
    }
public function cgetNodes ( Request $ request ) { $ tree = $ this -> getBooleanRequestParameter ( $ request , 'tree' , false , false ) ; $ ids = $ this -> getRequestParameter ( $ request , 'ids' ) ; if ( true === $ tree ) { return $ this -> getTreeForUuid ( $ request , $ this -> getRequestParameter ( $ request , 'id' , false , null ) ) ; } elseif ( null !== $ ids ) { return $ this -> getNodesByIds ( $ request , $ ids ) ; } $ language = $ this -> getLanguage ( $ request ) ; $ webspace = $ this -> getWebspace ( $ request ) ; $ excludeGhosts = $ this -> getBooleanRequestParameter ( $ request , 'exclude-ghosts' , false , false ) ; $ parentUuid = $ request -> get ( 'parentId' ) ; $ depth = $ request -> get ( 'depth' , 1 ) ; $ depth = intval ( $ depth ) ; $ flat = $ request -> get ( 'flat' , 'true' ) ; $ flat = ( 'true' === $ flat ) ; // TODO pagination $ result = $ this -> getRepository ( ) -> getNodes ( $ parentUuid , $ webspace , $ language , $ depth , $ flat , false , $ excludeGhosts ) ; return $ this -> handleView ( $ this -> view ( $ result ) ) ; }
Returns complete nodes.

@param Request $request

@return Response

@throws MissingParameterException
@throws ParameterDataTypeException

@deprecated this will be removed when the content-repository is able to solve all requirements
Returns complete nodes .