OrderedList
class OrderedList
Ordered list helper.
Properties
protected string | $padding | Padding. | |
protected Output | $output | Output instance. | |
protected FormatterInterface|null | $formatter | Formatter instance. |
Methods
array
calculateWidth(array $items, string $marker)
Calculates the maximum width of a marker in a list.
string
buildListItem(string $item, string $marker, int $width, int $number, int $nestingLevel, int $parentWidth)
Builds a list item.
string
buildList(array $items, string $marker, int $nestingLevel = 0, int $parentWidth = 0)
Builds an ordered list.
string
render(array $items, string $marker = '%s.')
Renders an ordered list.
draw(array $items, string $marker = '%s.', int $writer = Output::STANDARD)
Draws an ordered list.
Details
at line 50
__construct(Output $output)
Constructor.
at line 64
protected array
calculateWidth(array $items, string $marker)
Calculates the maximum width of a marker in a list.
at line 94
protected string
buildListItem(string $item, string $marker, int $width, int $number, int $nestingLevel, int $parentWidth)
Builds a list item.
at line 110
protected string
buildList(array $items, string $marker, int $nestingLevel = 0, int $parentWidth = 0)
Builds an ordered list.
at line 138
string
render(array $items, string $marker = '%s.')
Renders an ordered list.
at line 150
draw(array $items, string $marker = '%s.', int $writer = Output::STANDARD)
Draws an ordered list.