SubGraph Class¶
- class SubGraph¶
Represents a SubGraph
- __construct(?string $title = null, ?string $id = null)¶
Creates SubGraph
- addEdge(Edge ...$edge)¶
Add edge(s)
- Parameters:
...$edge (
Edge) – The edge(s)
- Returns:
A new instance of
SubGraphwith the edge(s) added- Return type:
- addNode(Node ...$node)¶
Add node(s)
- addSubGraph(SubGraph ...$subGraph)¶
Add subgraph(s)
- withComment(string $comment)¶
Add a comment
- Parameters:
$comment (
string) – The comment
- Returns:
A new instance of
SubGraphwith the comment- Return type:
- withDirection(Direction $direction)¶
Set the subgraph direction
The default subgraph direction is
Direction::TBNote
If any of the subgraph’s nodes link outside of the subgraph, the subgraph direction is ignored and the subgraph inherits the direction of the parent graph.
- Parameters:
$direction) (
Direction) – The direction
- Returns:
A new instance of
SubGraphwith the direction- Return type:
- withEdge(Edge ...$edge)¶
Set edge(s)
- Parameters:
...$edge (
Edge) – The edge(s)
- Returns:
A new instance of
SubGraphwith the edge(s)- Return type:
- withNode(Node ...$node)¶
Set node(s)