function ds_field_ui_fields_validate in Display Suite 8.3
Same name and namespace in other branches
- 8.4 includes/field_ui.inc \ds_field_ui_fields_validate()
- 8.2 includes/field_ui.inc \ds_field_ui_fields_validate()
- 7.2 includes/ds.field_ui.inc \ds_field_ui_fields_validate()
Form validation handler for _ds_field_ui_fields().
2 string references to 'ds_field_ui_fields_validate'
- ds_field_row_form_format_construct in includes/
field_ui.inc - Helper function for building the formatter settings.
- _ds_field_ui_core_fields in includes/
field_ui.inc - Alter the core field on the Field UI form.
File
- includes/
field_ui.inc, line 509 - Field UI functions for Display Suite.
Code
function ds_field_ui_fields_validate($form, FormStateInterface $form_state) {
$fields = $form_state
->getValue('fields');
foreach (Element::children($form['fields']) as $key) {
if (isset($fields[$key]['settings_edit_form']['settings'])) {
$settings = $fields[$key]['settings_edit_form']['settings'];
if (!empty($settings)) {
$plugin_settings = $form_state
->get('plugin_settings');
$plugin_settings[$key] = $settings;
$form_state
->set('plugin_settings', $plugin_settings);
}
}
if (isset($fields[$key]['settings_edit_form']['third_party_settings']['ds'])) {
$settings = $fields[$key]['settings_edit_form']['third_party_settings']['ds'];
if (!empty($settings)) {
$plugin_settings = $form_state
->get('plugin_settings');
$plugin_settings[$key] = $settings;
$form_state
->set('plugin_settings', $plugin_settings);
}
}
}
}