@@ -37,51 +37,39 @@ public function getRows(MenuStyle $style, bool $selected = false) : array
3737 }
3838
3939 /**
40- * Can the item be selected
40+ * Return the raw string of text
4141 */
42- public function canSelect () : bool
42+ public function getText () : string
4343 {
44- return false ;
44+ return $ this -> text ;
4545 }
4646
4747 /**
48- * Execute the items callable if required
48+ * Set the raw string of text
4949 */
50- public function getSelectAction () : ?callable
51- {
52- return null ;
53- }
54-
55- public function getStyle () : SelectableStyle
56- {
57- return $ this ->style ;
58- }
59-
60- public function setStyle (SelectableStyle $ style ) : self
50+ public function setText (string $ text ) : void
6151 {
62- $ this ->style = $ style ;
63-
64- return $ this ;
52+ $ this ->text = $ text ;
6553 }
6654
6755 /**
68- * Return the raw string of text
56+ * Execute the items callable if required
6957 */
70- public function getText () : string
58+ public function getSelectAction () : ? callable
7159 {
72- return $ this -> text ;
60+ return null ;
7361 }
7462
7563 /**
76- * Set the raw string of text
64+ * Can the item be selected
7765 */
78- public function setText ( string $ text ) : void
66+ public function canSelect ( ) : bool
7967 {
80- $ this -> text = $ text ;
68+ return false ;
8169 }
8270
8371 /**
84- * Whether or not the menu item is showing the menustyle extra value
72+ * Whether or not we are showing item extra
8573 */
8674 public function showsItemExtra () : bool
8775 {
@@ -103,4 +91,16 @@ public function hideItemExtra() : void
10391 {
10492 //noop
10593 }
94+
95+ public function getStyle () : SelectableStyle
96+ {
97+ return $ this ->style ;
98+ }
99+
100+ public function setStyle (SelectableStyle $ style ) : self
101+ {
102+ $ this ->style = $ style ;
103+
104+ return $ this ;
105+ }
106106}
0 commit comments