Mindmap Class

class Mindmap

Represents a Mindmap diagram

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)

Adds a comment to the mindmap

Parameters:
  • $comment (string) – The comment

Returns:

A new instance of Mindmap with a comment

Return type:

Mindmap

withRootNode(Node $root)

Sets the mindmap root node

Parameters:
  • $root (Node) – The root node

Returns:

A new instance of Mindmap with a root node

Return type:

Mindmap