Task¶
- class Task¶
Represents a Task in a Gantt chart
- __construct(string $title, string $enduration, ?string $id = null)¶
Create a new Task
- Parameters:
$title (
string) – Task title$enduration (
string) – Task end or duration
- Can be:
A date in the chart input date format (see
GanttChart::withDateFormat)A duration in the form nt where n is an integer and t is a letter indicating the duration unit, e.g. d for days
A string in the form until id where id is the id of the task or milestone that this task should end at
Warning
Multiple ids are not supported
- withComment(string $comment)¶
Set a comment for the Task
- Parameters:
$comment (
string) – The comment
- Returns:
A new
Taskinstance- Return type:
- withInteraction(string $interaction, InteractionType $type, ?string $tooltip = null, InteractionTarget $target = InteractionTarget::Self)¶
Set an interaction
Note
A task must have an id, and so must have its start set, if it is to have 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
Taskinstance with the interaction- Return type:
- withStart(string $start) self¶
Sets the start date of the task
The default (this method not called) is for the task to start immediately after the preceding task
- Parameters:
$start (
string) –Task start
Can be: * A date in the chart input date format (see
GanttChart::withDateFormat) * A string in the form after id where id is the id of the task or milestone after which this task should startWarning
Multiple ids are not supported
- Returns:
A new
Taskinstance- Return type: