Node Class¶
- class Node¶
Represents a Node in a Flowchart diagram
- __construct(NodeShape $shape = NodeShape::process, ?string $id = null)¶
Creates a Node
- Parameters:
$shape (
NodeShape) – The node shape (default:NodeShape::process)$id (
?string) – The node id (default: auto-generate)
- Returns:
A new instance of
Node- Return type:
- withComment(string $comment)¶
Add a comment
- Parameters:
$comment (
string) – The comment
- Returns:
A new instance of
Nodewith the comment- Return type:
- withInteraction(string $interaction, InteractionType $type, ?string $tooltip = null, InteractionTarget $target = InteractionTarget::Self)¶
Add an interaction to the node
- Parameters:
$interaction (
string) – The interaction, either a callback or URL$type (
InteractionType) – The interaction type$tooltip (
?string) – A tooltip for the interaction$target (
InteractionTarget) – The interaction target if $type ===Interaction::Link(default: InteractionTarget::Self)
- Returns:
A new instance of
Nodewith the interaction- Return type:
- withStyleClass(string $styleClass)¶
Set a style class for the node
- Parameters:
$styleClass (
string) – The style class
- Returns:
A new instance of
Nodewith the style class- Return type: