public function SettingsForm::submitForm in Bootstrap Layout Builder 1.x
Same name and namespace in other branches
- 2.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 214
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('background_image.bundle', $form_state
->getValue('background_image_bundle'))
->set('background_image.field', $form_state
->getValue('background_image_field'))
->set('background_local_video.bundle', $form_state
->getValue('background_local_video_bundle'))
->set('background_local_video.field', $form_state
->getValue('background_local_video_field'))
->set('background_colors', $form_state
->getValue('background_colors'))
->save();
parent::submitForm($form, $form_state);
}