1 | <?php |
||
19 | class ListItem extends AbstractBlock |
||
20 | { |
||
21 | /** |
||
22 | * @var ListData |
||
23 | */ |
||
24 | protected $listData; |
||
25 | |||
26 | 240 | public function __construct(ListData $listData) |
|
32 | |||
33 | /** |
||
34 | * @return ListData |
||
35 | */ |
||
36 | public function getListData() |
||
37 | { |
||
38 | return $this->listData; |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * Returns true if this block can contain the given block as a child node |
||
43 | * |
||
44 | * @param AbstractBlock $block |
||
45 | * |
||
46 | * @return bool |
||
47 | */ |
||
48 | 231 | public function canContain(AbstractBlock $block) |
|
49 | { |
||
50 | 231 | return true; |
|
51 | } |
||
52 | |||
53 | /** |
||
54 | * Returns true if block type can accept lines of text |
||
55 | * |
||
56 | * @return bool |
||
57 | */ |
||
58 | 237 | public function acceptsLines() |
|
59 | { |
||
60 | 237 | return false; |
|
61 | } |
||
62 | |||
63 | /** |
||
64 | * Whether this is a code block |
||
65 | * |
||
66 | * @return bool |
||
67 | */ |
||
68 | 237 | public function isCode() |
|
72 | |||
73 | 204 | public function matchesNextLine(Cursor $cursor) |
|
74 | { |
||
75 | 204 | if ($cursor->isBlank()) { |
|
89 | |||
90 | /** |
||
91 | * @param Cursor $cursor |
||
92 | * @param int $currentLineNumber |
||
93 | * |
||
94 | * @return bool |
||
95 | */ |
||
96 | 228 | public function shouldLastLineBeBlank(Cursor $cursor, $currentLineNumber) |
|
100 | } |
||
101 |