You are here

public function SettingsForm::buildForm in Paragraphs Features 2.x

Same name and namespace in other branches
  1. 8 src/Form/SettingsForm.php \Drupal\paragraphs_features\Form\SettingsForm::buildForm()

Form constructor.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array The form structure.

Overrides ConfigFormBase::buildForm

File

src/Form/SettingsForm.php, line 32

Class

SettingsForm
Settings form for paragraphs_features.

Namespace

Drupal\paragraphs_features\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('paragraphs_features.settings');
  $form['dropdown_to_button'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Reduce actions dropdown to a button when there is only one option'),
    '#default_value' => $config
      ->get('dropdown_to_button'),
  ];
  return parent::buildForm($form, $form_state);
}