You are here

function field_group_format_settings_form in Field Group 8.3

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

Creates a form for field_group formatters.

Parameters

Object $group: The FieldGroup object.

1 call to field_group_format_settings_form()
field_group_field_ui_display_form_alter in includes/field_ui.inc
Function to alter the display overview screens.

File

includes/field_ui.inc, line 509
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_format_settings_form(&$group, $form, $form_state) {
  $manager = \Drupal::service('plugin.manager.field_group.formatters');
  $plugin = $manager
    ->getInstance([
    'format_type' => $group->format_type,
    'configuration' => [
      'label' => $group->label,
      'settings' => $group->format_settings,
    ],
    'group' => $group,
  ]);
  if ($plugin) {
    return $plugin
      ->settingsForm($form, $form_state);
  }
  return [];
}