File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ abstract class MenuItem implements MenuItemContract
30
30
31
31
protected bool $ isChecked = false ;
32
32
33
+ protected ?string $ event = null ;
34
+
33
35
public function enabled (): self
34
36
{
35
37
$ this ->isEnabled = true ;
@@ -107,12 +109,20 @@ public function submenu(MenuItemContract ...$items): self
107
109
return $ this ;
108
110
}
109
111
112
+ public function event (string $ event ): self
113
+ {
114
+ $ this ->event = $ event ;
115
+
116
+ return $ this ;
117
+ }
118
+
110
119
public function toArray (): array
111
120
{
112
121
return array_filter ([
113
122
'type ' => $ this ->type ,
114
123
'id ' => $ this ->id ,
115
124
'label ' => $ this ->label ,
125
+ 'event ' => $ this ->event ,
116
126
'sublabel ' => $ this ->sublabel ,
117
127
'toolTip ' => $ this ->toolTip ,
118
128
'enabled ' => $ this ->isEnabled ,
You can’t perform that action at this time.
0 commit comments