| 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 | public function __construct(string $breakChar = ' ', int $lines = 1) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * The output text for the item |
||
| 31 | */ |
||
| 32 | public function getRows(MenuStyle $style, bool $selected = false) : array |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Can the item be selected |
||
| 45 | */ |
||
| 46 | public function canSelect() : bool |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Execute the items callable if required |
||
| 53 | */ |
||
| 54 | public function getSelectAction() : ?callable |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Return the raw string of text |
||
| 61 | */ |
||
| 62 | public function getText() : string |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Set the raw string of text |
||
| 69 | */ |
||
| 70 | public function setText(string $text) : void |
||
| 74 | |||
| 75 | /** |
||
| 76 | * Whether or not the menu item is showing the menustyle extra value |
||
| 77 | */ |
||
| 78 | public function showsItemExtra() : bool |
||
| 82 | |||
| 83 | /** |
||
| 84 | * Enable showing item extra |
||
| 85 | */ |
||
| 86 | public function showItemExtra() : void |
||
| 90 | |||
| 91 | /** |
||
| 92 | * Disable showing item extra |
||
| 93 | */ |
||
| 94 | public function hideItemExtra() : void |
||
| 98 | } |
||
| 99 |