UserJourney Class

class UserJourney

Represents a User Journey diagram

addSection(Section ...$section)

Add section(s)

Parameters:
  • ...$section (Section) – The section(s)

Returns:

A new instance of UserJourney with the section(s) added

Return type:

UserJourney

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 UserJourney with the comment

Return type:

UserJourney

withSection(Section ...$section)

Set section(s)

Parameters:
  • ...$section (Section) – The section(s)

Returns:

A new instance of UserJourney with the section(s)

Return type:

UserJourney

withTitle(string $title)

Set the title

Parameters:
  • $title (string) – The title

Returns:

A new instance of UserJourney with the title

Return type:

UserJourney