Context/FlatTreeContext.php
private function makeTree(array $result)
    {
        $tree = [];

        foreach ($result as $row) {
            $this->makeNode($row, $tree);
        }

        return $tree;
    }
private function makeTree(array $result)
    {
        $tree = [];

        foreach ($result as $row) {
            $this->makeNode($row, $tree);
        }

        return $tree;
    }
private function makeTree ( array $ result ) { $ tree = [ ] ; foreach ( $ result as $ row ) { $ this -> makeNode ( $ row , $ tree ) ; } return $ tree ; }
Creates flat tree structure from result rows

@param array $result

@return array
Creates flat tree structure from result rows