public function addGraph(self $graph): self
    {
        $graph->setType('subgraph');
        $this->graphs[$graph->getName()] = $graph;
        return $this;
    }
public function addGraph(self $graph): self
    {
        $graph->setType('subgraph');
        $this->graphs[$graph->getName()] = $graph;
        return $this;
    }
public function addGraph ( self $ graph ) : self { $ graph -> setType ( 'subgraph' ) ; $ this -> graphs [ $ graph -> getName ( ) ] = $ graph ; return $ this ; }
Adds a subgraph to this graph; automatically changes the type to subgraph.

Please note that an index is maintained using the name of the subgraph.
Thus if you have 2 subgraphs with the same name that the first will be
overwritten by the latter.

@param Graph $graph The graph to add onto this graph as
subgraph.
@see Graph::create()
Adds a subgraph to this graph ; automatically changes the type to subgraph .