You are here

function field_group_formatter_settings_update in Field Group 8.3

Same name and namespace in other branches
  1. 8 includes/field_ui.inc \field_group_formatter_settings_update()
  2. 7.2 field_group.field_ui.inc \field_group_formatter_settings_update()
  3. 7 field_group.field_ui.inc \field_group_formatter_settings_update()

Update handler for field_group configuration settings.

Parameters

Object $group: The group object.

array $settings: Configuration settings.

2 calls to field_group_formatter_settings_update()
field_group_field_ui_display_form_alter in includes/field_ui.inc
Function to alter the display overview screens.
field_group_formatter_row_update in includes/field_ui.inc
Update the row so that the group variables are updated. The rendering of the elements needs the updated defaults.

File

includes/field_ui.inc, line 550
Field_group.field_ui.inc is a file that contains most functions needed on the Fields UI Manage forms (display and fields).

Code

function field_group_formatter_settings_update(&$group, $settings) {

  // For format changes we load the defaults.
  if (empty($settings['settings_edit_form']['settings'])) {
    $group->format_settings = Drupal::service('plugin.manager.field_group.formatters')
      ->getDefaultSettings($group->format_type, $group->context);
  }
  else {
    $group->format_type = $settings['format']['type'];
    $group->label = $settings['settings_edit_form']['settings']['label'];
    $group->format_settings = $settings['settings_edit_form']['settings'];
  }
}