You are here

public function SharedEmailSettingsForm::submitForm in Shared Email 8.2

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/SharedEmailSettingsForm.php, line 59

Class

SharedEmailSettingsForm
Class SharedEmailSettingsForm.

Namespace

Drupal\sharedemail\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {

  // Save the preferences.
  $this
    ->config('sharedemail.settings')
    ->set('sharedemail_msg', $form_state
    ->getValue('sharedemail_msg'))
    ->set('sharedemail_allowed', $form_state
    ->getValue('sharedemail_allowed'))
    ->save();
  parent::submitForm($form, $form_state);
}