You are here

public function Accordion::settingsForm in Field Group 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/field_group/FieldGroupFormatter/Accordion.php \Drupal\field_group\Plugin\field_group\FieldGroupFormatter\Accordion::settingsForm()

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 FieldGroupFormatterBase::settingsForm

File

src/Plugin/field_group/FieldGroupFormatter/Accordion.php, line 52

Class

Accordion
Plugin implementation of the 'accordion' formatter.

Namespace

Drupal\field_group\Plugin\field_group\FieldGroupFormatter

Code

public function settingsForm() {
  $form = parent::settingsForm();
  $form['effect'] = array(
    '#title' => $this
      ->t('Effect'),
    '#type' => 'select',
    '#options' => array(
      'none' => $this
        ->t('None'),
      'bounceslide' => $this
        ->t('Bounce slide'),
    ),
    '#default_value' => $this
      ->getSetting('effect'),
    '#weight' => 2,
  );
  return $form;
}