You are here

public function CollapsiblockGlobalSettings::submitForm in Collapsiblock 8.2

Same name and namespace in other branches
  1. 8 src/Form/CollapsiblockGlobalSettings.php \Drupal\collapsiblock\Form\CollapsiblockGlobalSettings::submitForm()
  2. 4.x src/Form/CollapsiblockGlobalSettings.php \Drupal\collapsiblock\Form\CollapsiblockGlobalSettings::submitForm()
  3. 3.x src/Form/CollapsiblockGlobalSettings.php \Drupal\collapsiblock\Form\CollapsiblockGlobalSettings::submitForm()

Form submission handler.

Parameters

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

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

Overrides ConfigFormBase::submitForm

File

src/Form/CollapsiblockGlobalSettings.php, line 81

Class

CollapsiblockGlobalSettings
Class CollapsiblockGlobalSettings.

Namespace

Drupal\collapsiblock\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {

  // Retrieve the configuration.
  $values = $form_state
    ->getValues();
  $this
    ->config('collapsiblock.settings')
    ->set('default_action', $values['default_action'])
    ->set('active_pages', $values['active_pages'])
    ->set('slide_type', $values['slide_type'])
    ->set('slide_speed', $values['slide_speed'])
    ->save();
}