@@ -87,10 +87,11 @@ protected function getHeaderActions(): array
87
87
->form ($ this ->getMenuItemFormSchema ())
88
88
->fillForm (function (array $ arguments ): array {
89
89
$ parentId = $ arguments ['parent_id ' ] ?? null ;
90
+
90
91
return [
91
92
'parent_id ' => $ parentId ,
92
93
'is_visible ' => true ,
93
- 'target ' => '_self '
94
+ 'target ' => '_self ' ,
94
95
];
95
96
})
96
97
->action (function (array $ data , array $ arguments ): void {
@@ -103,7 +104,8 @@ protected function getHeaderActions(): array
103
104
})
104
105
->modalHeading (function (array $ arguments ): string {
105
106
$ parentId = $ arguments ['parent_id ' ] ?? null ;
106
- return $ parentId
107
+
108
+ return $ parentId
107
109
? flexiblePagesTrans ('menu_items.tree.add_child ' )
108
110
: flexiblePagesTrans ('menu_items.tree.add_item ' );
109
111
})
@@ -121,20 +123,18 @@ protected function getActions(): array
121
123
];
122
124
}
123
125
124
-
125
-
126
126
public function editMenuItemAction (): Action
127
127
{
128
128
return Action::make ('editMenuItem ' )
129
129
->form ($ this ->getMenuItemFormSchema ())
130
130
->fillForm (function (array $ arguments ): array {
131
131
$ itemId = $ arguments ['itemId ' ] ?? null ;
132
- if (!$ itemId ) {
132
+ if (! $ itemId ) {
133
133
return [];
134
134
}
135
-
135
+
136
136
$ item = $ this ->getMenuItemSecurely ($ itemId );
137
- if (!$ item ) {
137
+ if (! $ item ) {
138
138
return [];
139
139
}
140
140
@@ -752,7 +752,7 @@ public function updateMenuItem(int $itemId, array $data): void
752
752
protected function validateMenuItemData (array $ data ): void
753
753
{
754
754
// Label is only required if use_model_title is false
755
- if (empty ($ data ['label ' ]) && !($ data ['use_model_title ' ] ?? false )) {
755
+ if (empty ($ data ['label ' ]) && ! ($ data ['use_model_title ' ] ?? false )) {
756
756
throw new Exception (flexiblePagesTrans ('menu_items.form.label_lbl ' ).' is required ' );
757
757
}
758
758
0 commit comments