function ds_field_row_form_format_summary_construct in Display Suite 8.3
Same name and namespace in other branches
- 8.4 includes/field_ui.inc \ds_field_row_form_format_summary_construct()
- 8.2 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 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 1505 - 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 = [
'#submit' => [
[
$build_info['callback_object'],
'multistepSubmit',
],
],
'#ajax' => [
'callback' => [
$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 + [
'#type' => 'image_button',
'#name' => $key . '_plugin_settings_edit',
'#src' => 'core/misc/icons/787878/cog.svg',
'#attributes' => [
'class' => [
'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' => [
[
'fields',
$key,
'type',
],
],
'#prefix' => '<div class="field-plugin-settings-edit-wrapper">',
'#suffix' => '</div>',
];
}