public function ConfigForm::submitForm in Insert 8
Same name and namespace in other branches
- 8.2 src/Form/ConfigForm.php \Drupal\insert\Form\ConfigForm::submitForm()
@inheritdoc
Overrides ConfigFormBase::submitForm
File
- src/
Form/ ConfigForm.php, line 81
Class
Namespace
Drupal\insert\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('insert.config');
$config
->set('text_formats', array_keys(array_filter($form_state
->getValue('text_formats'), function ($value) {
return !!$value;
})));
$config
->set('css_classes.file', $form_state
->getValue('file'));
$config
->set('css_classes.image', $form_state
->getValue('image'));
$config
->save();
parent::submitForm($form, $form_state);
}