concrete/controllers/backend/tree/node.php
public function load_starting()
    {
        $node = $this->loadNode();

        $r = array();
        foreach ($node->getChildNodes() as $childnode) {
            $json = $childnode->getTreeNodeJSON();
            if ($json) {
                $r[] = $json;
            }
        }
        $node = $node->getTreeNodeJSON();
        $node->children = $r;
        return new JsonResponse([$node]);
    }
public function load_starting()
    {
        $node = $this->loadNode();

        $r = array();
        foreach ($node->getChildNodes() as $childnode) {
            $json = $childnode->getTreeNodeJSON();
            if ($json) {
                $r[] = $json;
            }
        }
        $node = $node->getTreeNodeJSON();
        $node->children = $r;
        return new JsonResponse([$node]);
    }
public function load_starting ( ) { $ node = $ this -> loadNode ( ) ; $ r = array ( ) ; foreach ( $ node -> getChildNodes ( ) as $ childnode ) { $ json = $ childnode -> getTreeNodeJSON ( ) ; if ( $ json ) { $ r [ ] = $ json ; } } $ node = $ node -> getTreeNodeJSON ( ) ; $ node -> children = $ r ; return new JsonResponse ( [ $ node ] ) ; }
This endpoint is meant to be called when we are starting from a particular spot
in the tree. It will include the current node, and the children, while normally
loading the node will only return the children.
@return JsonResponse
This endpoint is meant to be called when we are starting from a particular spot in the tree . It will include the current node and the children while normally loading the node will only return the children .