public function MaillogSettingsForm::submitForm in Maillog / Mail Developer 8
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/ MaillogSettingsForm.php, line 71
Class
- MaillogSettingsForm
- Configure file system settings for this site.
Namespace
Drupal\maillog\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this
->config('maillog.settings')
->set('send', $form_state
->getValue('maillog_send'))
->set('log', $form_state
->getValue('maillog_log'))
->set('verbose', $form_state
->getValue('maillog_verbose'))
->save();
parent::submitForm($form, $form_state);
if ($this
->config('maillog.settings')
->get('verbose') == TRUE) {
$this
->messenger()
->addWarning($this
->t('Any user having the permission "view maillog" will see output of any mail that is sent.'));
}
}