public function getChildEdges()
    {
        $edges        = [];
        $hasChildren = false;

        foreach ($this->fields as $v) {
            if ($v instanceof GraphEdge) {
                $hasChildren = true;

                $children = $v->getChildEdges();
                foreach ($children as $childEdges) {
                    $edges[] = array_merge([$this->name], $childEdges);
                }
            }
        }

        // Means this is the final node (no further sub edges)
        if (!$hasChildren) {
            $edges[] = [$this->name];
        }

        return $edges;
    }
public function getChildEdges()
    {
        $edges        = [];
        $hasChildren = false;

        foreach ($this->fields as $v) {
            if ($v instanceof GraphEdge) {
                $hasChildren = true;

                $children = $v->getChildEdges();
                foreach ($children as $childEdges) {
                    $edges[] = array_merge([$this->name], $childEdges);
                }
            }
        }

        // Means this is the final node (no further sub edges)
        if (!$hasChildren) {
            $edges[] = [$this->name];
        }

        return $edges;
    }
public function getChildEdges ( ) { $ edges = [ ] ; $ hasChildren = false ; foreach ( $ this -> fields as $ v ) { if ( $ v instanceof GraphEdge ) { $ hasChildren = true ; $ children = $ v -> getChildEdges ( ) ; foreach ( $ children as $ childEdges ) { $ edges [ ] = array_merge ( [ $ this -> name ] , $ childEdges ) ; } } } // Means this is the final node (no further sub edges) if ( ! $ hasChildren ) { $ edges [ ] = [ $ this -> name ] ; } return $ edges ; }
Arrange the child edge nodes into a multidimensional array.

@return array
Arrange the child edge nodes into a multidimensional array .