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() : int |
||
46 | |||
47 | /** |
||
48 | * Sets the row number the item starts at in the frame |
||
49 | */ |
||
50 | public function setStartRowNumber(int $rowNumber) : void |
||
54 | |||
55 | /** |
||
56 | * Returns the row number the item starts at in the frame |
||
57 | */ |
||
58 | public function getStartRowNumber() : int |
||
62 | |||
63 | /** |
||
64 | * The output text for the item |
||
65 | */ |
||
66 | public function getRows(MenuStyle $style, bool $selected = false) : array |
||
80 | |||
81 | /** |
||
82 | * Can the item be selected |
||
83 | */ |
||
84 | public function canSelect() : bool |
||
88 | |||
89 | /** |
||
90 | * Execute the items callable if required |
||
91 | */ |
||
92 | public function getSelectAction() : ?callable |
||
96 | |||
97 | /** |
||
98 | * Return the raw string of text |
||
99 | */ |
||
100 | public function getText() : string |
||
104 | |||
105 | /** |
||
106 | * Whether or not the menu item is showing the menustyle extra value |
||
107 | */ |
||
108 | public function showsItemExtra() : bool |
||
112 | |||
113 | /** |
||
114 | * Enable showing item extra |
||
115 | */ |
||
116 | public function showItemExtra() : void |
||
120 | |||
121 | /** |
||
122 | * Disable showing item extra |
||
123 | */ |
||
124 | public function hideItemExtra() : void |
||
128 | } |
||
129 |