function ds_field_row_form_format_summary_construct in Display Suite 8.2
Same name and namespace in other branches
- 8.4 includes/field_ui.inc \ds_field_row_form_format_summary_construct()
- 8.3 includes/field_ui.inc \ds_field_row_form_format_summary_construct()
- 7.2 includes/ds.field_ui.inc \ds_field_row_form_format_summary_construct()
Helper function for formatter summary settings.
2 calls to ds_field_row_form_format_summary_construct()
- _ds_field_ui_core_fields in includes/
field_ui.inc - Alter the core field on the the Field UI form.
- _ds_field_ui_fields in includes/
field_ui.inc - Add the fields to the Field UI form.
File
- includes/
field_ui.inc, line 1323 - Field UI functions for Display Suite.
Code
function ds_field_row_form_format_summary_construct(&$table, $key, FormStateInterface $form_state) {
$build_info = $form_state
->getBuildInfo();
$base_button = array(
'#submit' => array(
array(
$build_info['callback_object'],
'multistepSubmit',
),
),
'#ajax' => array(
'callback' => array(
$build_info['callback_object'],
'multistepAjax',
),
'wrapper' => 'field-display-overview-wrapper',
'effect' => 'fade',
),
'#field_name' => $key,
);
// Add the configure button.
$table[$key]['settings_edit'] = $base_button + array(
'#type' => 'image_button',
'#name' => $key . '_plugin_settings_edit',
'#src' => 'core/misc/icons/787878/cog.svg',
'#attributes' => array(
'class' => array(
'field-plugin-settings-edit',
),
'alt' => t('Edit'),
),
'#op' => 'edit',
// Do not check errors for the 'Edit' button, but make sure we get
// the value of the 'plugin type' select.
'#limit_validation_errors' => array(
array(
'fields',
$key,
'type',
),
),
'#prefix' => '<div class="field-plugin-settings-edit-wrapper">',
'#suffix' => '</div>',
);
}