We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 06f479c commit 79f5895Copy full SHA for 79f5895
formwidgets/Blocks.php
@@ -337,9 +337,14 @@ protected function processInspectorConfig(array $config): array
337
'span',
338
]));
339
340
- if (isset($defined['options']) && is_array($defined['options'])) {
341
- foreach ($defined['options'] as $key => &$value) {
342
- $value = Lang::get($value);
+ if (isset($defined['options'])) {
+ if (is_array($defined['options'])) {
+ foreach ($defined['options'] as $key => &$value) {
343
+ $value = Lang::get($value);
344
+ }
345
+ } elseif (is_callable($defined['options'])) {
346
+ $callable = $defined['options'];
347
+ $defined['options'] = $callable($this->formWidget, $this->formField);
348
}
349
350
0 commit comments