public function SettingsForm::submitForm in Layouter - WYSIWYG layout templates 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 83
Class
- SettingsForm
- Provides admin page settings form.
Namespace
Drupal\layouter\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('layouter.settings');
$data = [
'text_formats' => $form_state
->getValue('text_formats'),
'image_styles' => $form_state
->getValue('image_styles'),
'uri_scheme' => $form_state
->getValue('uri_scheme'),
];
$config
->setData($data)
->save();
parent::submitForm($form, $form_state);
}