File tree Expand file tree Collapse file tree 1 file changed +2
-18
lines changed
Expand file tree Collapse file tree 1 file changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -156,26 +156,10 @@ private function mapUrl(array $field): array
156156
157157 return $ mapped ;
158158 }
159-
160- // TODO: We do not have anything like this
159+
161160 private function mapButtonGroup (array $ field ): array
162161 {
163- $ mapped = $ this ->mapBasic ($ field , 'buttonGroup ' );
164- $ mapped ['type ' ] = 'radio ' ;
165-
166- $ mapped ['choices ' ] = [];
167- foreach ($ field ['choices ' ] as $ key => $ value ) {
168- $ mapped ['choices ' ][$ key ] = [
169- 'type ' => $ mapped ['type ' ],
170- 'label ' => $ value ,
171- 'required ' => $ mapped ['required ' ] ?? false ,
172- 'name ' => $ field ['key ' ],
173- 'value ' => $ key ,
174- 'checked ' => ($ field ['default_value ' ] ?? '' ) === $ key ,
175- ];
176- }
177-
178- return $ mapped ;
162+ return $ this ->mapRadio ($ field );
179163 }
180164
181165 private function mapTimePicker (array $ field ): array
You can’t perform that action at this time.
0 commit comments