Milestone

class Milestone

Represents a Milestone on a Gantt chart

__construct(string $title, string $when, string $duration, ?string $id = null)

Create a Milestone

Parameters:
  • $title (string) – Milestone title

  • $when (string) – When the Milestone starts in the chart input date format (see GanttChart::withDateFormat)

  • $duration (string) – Milestone duration in the form nt where n is an integer and t is a letter indicating the duration unit, e.g. d for days

  • $id (?string) – Milestone id (default: no id)

Returns:

A new Milestone instance

Return type:

Milestone

withComment(string $comment)

Set a comment for the Milestone

Parameters:
  • $comment (string) – The comment

Returns:

A new Milestone instance

Return type:

Milestone

withInteraction(string $interaction, InteractionType $type, ?string $tooltip = null, InteractionTarget $target = InteractionTarget::Self)

Set an interaction

Parameters:
  • $interaction (string) – Interaction text

  • $type (InteractionType) – Interaction type; callback or link

  • $tooltip (?string) – Tooltip text (default: no tooltip)

  • $target (InteractionTarget) – Interaction target (default: current window)

Returns:

A new Milestone instance with the interaction

Return type:

Milestone