1 | <?php |
||
12 | class StaticItem implements MenuItemInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $text; |
||
18 | |||
19 | public function __construct(string $text) |
||
23 | |||
24 | /** |
||
25 | * The output text for the item |
||
26 | */ |
||
27 | public function getRows(MenuStyle $style, bool $selected = false) : array |
||
31 | |||
32 | /** |
||
33 | * Can the item be selected |
||
34 | */ |
||
35 | public function canSelect() : bool |
||
39 | |||
40 | /** |
||
41 | * Execute the items callable if required |
||
42 | */ |
||
43 | public function getSelectAction() : ?callable |
||
47 | |||
48 | /** |
||
49 | * Return the raw string of text |
||
50 | */ |
||
51 | public function getText() : string |
||
55 | |||
56 | /** |
||
57 | * Set the raw string of text |
||
58 | */ |
||
59 | public function setText(string $text) : void |
||
63 | |||
64 | /** |
||
65 | * Whether or not the menu item is showing the menustyle extra value |
||
66 | */ |
||
67 | public function showsItemExtra() : bool |
||
71 | |||
72 | /** |
||
73 | * Enable showing item extra |
||
74 | */ |
||
75 | public function showItemExtra() : void |
||
79 | |||
80 | /** |
||
81 | * Disable showing item extra |
||
82 | */ |
||
83 | public function hideItemExtra() : void |
||
87 | } |
||
88 |