public function CollapsiblockGlobalSettings::submitForm in Collapsiblock 8
Same name and namespace in other branches
- 8.2 src/Form/CollapsiblockGlobalSettings.php \Drupal\collapsiblock\Form\CollapsiblockGlobalSettings::submitForm()
- 4.x src/Form/CollapsiblockGlobalSettings.php \Drupal\collapsiblock\Form\CollapsiblockGlobalSettings::submitForm()
- 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 87
Class
- CollapsiblockGlobalSettings
- Class CollapsiblockGlobalSettings.
Namespace
Drupal\collapsiblock\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
// Retrieve the configuration.
$values = $form_state
->getValues();
$this
->config('collapsiblock.settings')
->set('default_state', $values['collapsiblock_default_state'])
->set('active_pages', $values['collapsiblock_active_pages'])
->set('slide_type', $values['collapsiblock_slide_type'])
->set('slide_speed', $values['collapsiblock_slide_speed'])
->save();
}