You are here

public function ConfigForm::submitForm in Private Message 8

Same name and namespace in other branches
  1. 8.2 src/Form/ConfigForm.php \Drupal\private_message\Form\ConfigForm::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/ConfigForm.php, line 69

Class

ConfigForm
Defines the configuration form for the private message module.

Namespace

Drupal\private_message\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('private_message.settings')
    ->set('enable_email_notifications', (bool) $form_state
    ->getValue('enable_email_notifications'))
    ->set('send_by_default', (bool) $form_state
    ->getValue('send_by_default'))
    ->set('hide_form_filter_tips', (bool) $form_state
    ->getValue('hide_form_filter_tips'))
    ->save();
  parent::submitForm($form, $form_state);
}