Section

class Section

Represents a Section in a Gantt chart.

Groups Tasks and Milestones in the chart.

__construct(string $title)

Create a Section

Parameters:
  • $title (string) – Section title

Returns:

A new Section instance

Return type:

Section

addItem(Milestone|Task ...$item)

Add item(s) to the Section

Parameters:
  • $item (Milestone|Task) – The item(s)

Returns:

A new Section instance with the item(s) added

Return type:

Section

withComment(string $comment) self

Set a comment for the Section

Parameters:
  • $comment (string) – The comment

Returns:

A new Section instance

Return type:

Section

withItem(Milestone|Task ...$item)

Set Section item(s)

Parameters:
  • $item (Milestone|Task) – The item(s)

Returns:

A new Section instance with the item(s)

Return type:

Section