You are here

public function HtmlMailConfigurationForm::submitForm in HTML Mail 8

Same name and namespace in other branches
  1. 8.3 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 323

Class

HtmlMailConfigurationForm
Class HtmlMailConfigurationForm.

Namespace

Drupal\htmlmail\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->configFactory
    ->getEditable('htmlmail.settings')
    ->set('htmlmail_debug', $form_state
    ->getValue('htmlmail_debug'))
    ->set('htmlmail_theme', $form_state
    ->getValue('htmlmail_theme'))
    ->set('htmlmail_html_with_plain', $form_state
    ->getValue('htmlmail_html_with_plain'))
    ->set('htmlmail_postfilter', $form_state
    ->getValue('htmlmail_postfilter'))
    ->set('htmlmail_use_mime_mail', $form_state
    ->getValue('htmlmail_use_mime_mail'))
    ->save();
  parent::submitForm($form, $form_state);
}