public function SettingsForm::submitForm in Layout Builder Browser 8
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 92
Class
- SettingsForm
- Settings form.
Namespace
Drupal\layout_builder_browser\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('layout_builder_browser.settings');
$config
->set('enabled_section_storages', array_filter($form_state
->getValue('enabled_section_storages')));
$config
->set('use_modal', $form_state
->getValue('use_modal'));
$config
->set('auto_added_reusable_block_content_bundles', array_filter($form_state
->getValue('auto_added_reusable_block_content_bundles')));
$config
->save();
parent::submitForm($form, $form_state);
}