1 | <?php |
||
20 | class ListBlock extends AbstractBlock |
||
21 | { |
||
22 | const TYPE_UNORDERED = 'Bullet'; |
||
23 | const TYPE_ORDERED = 'Ordered'; |
||
24 | |||
25 | /** |
||
26 | * @var bool |
||
27 | */ |
||
28 | protected $tight = false; |
||
29 | |||
30 | /** |
||
31 | * @var ListData |
||
32 | */ |
||
33 | protected $listData; |
||
34 | |||
35 | 270 | public function __construct(ListData $listData) |
|
39 | |||
40 | /** |
||
41 | * @return ListData |
||
42 | */ |
||
43 | 267 | public function getListData(): ListData |
|
47 | |||
48 | /** |
||
49 | * @return bool |
||
50 | */ |
||
51 | 30 | public function endsWithBlankLine(): bool |
|
63 | |||
64 | /** |
||
65 | * Returns true if this block can contain the given block as a child node |
||
66 | * |
||
67 | * @param AbstractBlock $block |
||
68 | * |
||
69 | * @return bool |
||
70 | */ |
||
71 | 246 | public function canContain(AbstractBlock $block): bool |
|
75 | |||
76 | /** |
||
77 | * Whether this is a code block |
||
78 | * |
||
79 | * @return bool |
||
80 | */ |
||
81 | 129 | public function isCode(): bool |
|
85 | |||
86 | 210 | public function matchesNextLine(Cursor $cursor): bool |
|
90 | |||
91 | 246 | public function finalize(ContextInterface $context, int $endLineNumber) |
|
118 | |||
119 | /** |
||
120 | * @return bool |
||
121 | */ |
||
122 | 267 | public function isTight(): bool |
|
126 | |||
127 | /** |
||
128 | * @param bool $tight |
||
129 | * |
||
130 | * @return $this |
||
131 | */ |
||
132 | 3 | public function setTight(bool $tight): self |
|
138 | } |
||
139 |