1 | <?php |
||
11 | class LineBreakItem implements MenuItemInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private $breakChar; |
||
17 | |||
18 | /** |
||
19 | * @var int |
||
20 | */ |
||
21 | private $lines; |
||
22 | |||
23 | /** |
||
24 | * @var int |
||
25 | */ |
||
26 | private $numberOfRows = 0; |
||
27 | |||
28 | /** |
||
29 | * @var int |
||
30 | */ |
||
31 | private $startRowNumber = 0; |
||
32 | |||
33 | public function __construct(string $breakChar = ' ', int $lines = 1) |
||
38 | |||
39 | /** |
||
40 | * Returns the number of terminal rows the item takes |
||
41 | */ |
||
42 | public function getNumberOfRows() { |
||
45 | |||
46 | /** |
||
47 | * Sets the row number the item starts at in the frame |
||
48 | */ |
||
49 | public function setStartRowNumber(int $rowNumber) { |
||
52 | |||
53 | /** |
||
54 | * Returns the row number the item starts at in the frame |
||
55 | */ |
||
56 | public function getStartRowNumber() { |
||
59 | |||
60 | /** |
||
61 | * The output text for the item |
||
62 | */ |
||
63 | public function getRows(MenuStyle $style, bool $selected = false) : array |
||
77 | |||
78 | /** |
||
79 | * Can the item be selected |
||
80 | */ |
||
81 | public function canSelect() : bool |
||
85 | |||
86 | /** |
||
87 | * Execute the items callable if required |
||
88 | */ |
||
89 | public function getSelectAction() : ?callable |
||
93 | |||
94 | /** |
||
95 | * Return the raw string of text |
||
96 | */ |
||
97 | public function getText() : string |
||
101 | |||
102 | /** |
||
103 | * Whether or not the menu item is showing the menustyle extra value |
||
104 | */ |
||
105 | public function showsItemExtra() : bool |
||
109 | |||
110 | /** |
||
111 | * Enable showing item extra |
||
112 | */ |
||
113 | public function showItemExtra() : void |
||
117 | |||
118 | /** |
||
119 | * Disable showing item extra |
||
120 | */ |
||
121 | public function hideItemExtra() : void |
||
125 | } |
||
126 |