Skip to content
Snippets Groups Projects

Check that plugins are valid

1 file
+ 2
1
Compare changes
  • Side-by-side
  • Inline
@@ -47,7 +47,8 @@ class PluginConfig extends FormElement {
];
}
$plugins = $form_state->getValue($element['#parents']) ? array_filter($form_state->getValue($element['#parents']), function($p) {return is_array($p) && isset($p['id']);}) : $element['#default_value'];
$plugins = $form_state->getValue($element['#parents']) ?: $element['#default_value'];
$plugins = array_filter($plugins, function($p) {return is_array($p) && isset($p['id']);});
foreach ($plugins as $uuid => $plugin) {
$element[$uuid] = [
'#type' => 'details',
Loading