public function SettingsForm::submitForm in Bootstrap Layout Builder 2.x
Same name and namespace in other branches
- 1.x src/Form/SettingsForm.php \Drupal\bootstrap_layout_builder\Form\SettingsForm::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/ SettingsForm.php, line 75
Class
- SettingsForm
- Configure Bootstrap Layout Builder settings.
Namespace
Drupal\bootstrap_layout_builder\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->configFactory
->getEditable(static::SETTINGS)
->set('hide_section_settings', $form_state
->getValue('hide_section_settings'))
->set('live_preview', $form_state
->getValue('live_preview'))
->set('responsive', $form_state
->getValue('responsive'))
->set('one_col_layout_class', $form_state
->getValue('one_col_layout_class'))
->save();
parent::submitForm($form, $form_state);
}