File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ abstract class MenuItem implements MenuItemContract
10
10
{
11
11
protected string $ type = 'normal ' ;
12
12
13
+ protected ?string $ id = null ;
14
+
13
15
protected ?string $ label = null ;
14
16
15
17
protected ?string $ sublabel = null ;
@@ -42,6 +44,13 @@ public function disabled(): self
42
44
return $ this ;
43
45
}
44
46
47
+ public function id (string $ id ): self
48
+ {
49
+ $ this ->id = $ id ;
50
+
51
+ return $ this ;
52
+ }
53
+
45
54
public function label (string $ label ): self
46
55
{
47
56
$ this ->label = $ label ;
@@ -84,7 +93,7 @@ public function checked($checked = true): self
84
93
return $ this ;
85
94
}
86
95
87
- public function toolTip (string $ toolTip ): self
96
+ public function tooltip (string $ toolTip ): self
88
97
{
89
98
$ this ->toolTip = $ toolTip ;
90
99
@@ -102,6 +111,7 @@ public function toArray(): array
102
111
{
103
112
return array_filter ([
104
113
'type ' => $ this ->type ,
114
+ 'id ' => $ this ->id ,
105
115
'label ' => $ this ->label ,
106
116
'sublabel ' => $ this ->sublabel ,
107
117
'toolTip ' => $ this ->toolTip ,
You can’t perform that action at this time.
0 commit comments