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
1010{
1111 protected string $ type = 'normal ' ;
1212
13+ protected ?string $ id = null ;
14+
1315 protected ?string $ label = null ;
1416
1517 protected ?string $ sublabel = null ;
@@ -42,6 +44,13 @@ public function disabled(): self
4244 return $ this ;
4345 }
4446
47+ public function id (string $ id ): self
48+ {
49+ $ this ->id = $ id ;
50+
51+ return $ this ;
52+ }
53+
4554 public function label (string $ label ): self
4655 {
4756 $ this ->label = $ label ;
@@ -84,7 +93,7 @@ public function checked($checked = true): self
8493 return $ this ;
8594 }
8695
87- public function toolTip (string $ toolTip ): self
96+ public function tooltip (string $ toolTip ): self
8897 {
8998 $ this ->toolTip = $ toolTip ;
9099
@@ -102,6 +111,7 @@ public function toArray(): array
102111 {
103112 return array_filter ([
104113 'type ' => $ this ->type ,
114+ 'id ' => $ this ->id ,
105115 'label ' => $ this ->label ,
106116 'sublabel ' => $ this ->sublabel ,
107117 'toolTip ' => $ this ->toolTip ,
You can’t perform that action at this time.
0 commit comments