Flowchart Class¶
- class Flowchart¶
Represents a Flowchart diagram
- addEdge(Edge ...$edge)¶
Add edge(s)
- Parameters:
...$edge (
Edge) – The edge(s)
- Returns:
A new instance of
Flowchartwith the edge(s) added- Return type:
- addNode(Node ...$node)¶
Add node(s) and/or sub-graphs
- addSubGraph(SubGraph ...$subGraph)¶
Add sub-graph(s)
- render(array $attributes = [])¶
Renders the diagram
- Parameters:
$attributes (
array) –HTML attributes for the <pre> tag as name=>value pairs
Note
The mermaid class is added
- Returns:
Mermaid diagram code in a <pre> tag
- Return type:
string
- withComment(string $comment)¶
Add a comment
- Parameters:
$comment (
string) – The comment
- Returns:
A new instance of
Flowchartwith the comment- Return type:
- withDirection(Direction $direction)¶
Set the flowchart direction
The default flowchart direction is
Direction::TB- Parameters:
$direction) (
Direction) – The direction
- Returns:
A new instance of
Flowchartwith the direction- Return type:
- withEdge(Edge ...$edge)¶
Set edge(s)
- Parameters:
...$edge (
Edge) – The edge(s)
- Returns:
A new instance of
Flowchartwith the edge(s)- Return type:
- withNode(Node ...$node)¶
Set node(s)
- withSubGraph(SubGraph ...$subGraph)¶
Set sub-graph(s)