You are here

public function HtmlMailConfigurationForm::submitForm in HTML Mail 8.3

Same name and namespace in other branches
  1. 8 src/Form/HtmlMailConfigurationForm.php \Drupal\htmlmail\Form\HtmlMailConfigurationForm::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/HtmlMailConfigurationForm.php, line 329

Class

HtmlMailConfigurationForm
Class HtmlMailConfigurationForm.

Namespace

Drupal\htmlmail\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->configFactory
    ->getEditable('htmlmail.settings')
    ->set('debug', $form_state
    ->getValue('debug'))
    ->set('theme', $form_state
    ->getValue('theme'))
    ->set('html_with_plain', $form_state
    ->getValue('html_with_plain'))
    ->set('postfilter', $form_state
    ->getValue('postfilter'))
    ->set('use_mail_mime', $form_state
    ->getValue('use_mail_mime'))
    ->save();
  parent::submitForm($form, $form_state);
}