public function MailSettingsForm::submitForm in Simplenews 8
Same name and namespace in other branches
- 8.2 src/Form/MailSettingsForm.php \Drupal\simplenews\Form\MailSettingsForm::submitForm()
- 3.x src/Form/MailSettingsForm.php \Drupal\simplenews\Form\MailSettingsForm::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/ MailSettingsForm.php, line 80
Class
- MailSettingsForm
- Configure simplenews newsletter settings.
Namespace
Drupal\simplenews\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this
->config('simplenews.settings')
->set('mail.use_cron', $form_state
->getValue('simplenews_use_cron'))
->set('mail.source_cache', $form_state
->getValue('simplenews_source_cache'))
->set('mail.throttle', $form_state
->getValue('simplenews_throttle'))
->set('mail.spool_expire', $form_state
->getValue('simplenews_spool_expire'))
->set('mail.debug', $form_state
->getValue('simplenews_debug'))
->save();
parent::submitForm($form, $form_state);
}