You are here

public function DetailsSidebar::settingsForm in Field Group 8.3

Returns a form to configure settings for the formatter.

Invoked in field_group_field_ui_display_form_alter to allow administrators to configure the formatter. The field_group module takes care of handling submitted form values.

Return value

array The form elements for the formatter settings.

Overrides Details::settingsForm

File

src/Plugin/field_group/FieldGroupFormatter/DetailsSidebar.php, line 36

Class

DetailsSidebar
Details Sidebar element.

Namespace

Drupal\field_group\Plugin\field_group\FieldGroupFormatter

Code

public function settingsForm() {
  $form = parent::settingsForm();
  $form['weight'] = [
    '#type' => 'number',
    '#title' => $this
      ->t('Weight'),
    '#default_value' => $this
      ->getSetting('weight'),
  ];
  return $form;
}