public function MandrillAdminSettingsForm::submitForm in Mandrill 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/ MandrillAdminSettingsForm.php, line 345
Class
- MandrillAdminSettingsForm
- Implements an Mandrill Admin Settings form.
Namespace
Drupal\mandrill\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
\Drupal::configFactory()
->getEditable('mandrill.settings')
->set('mandrill_api_key', $form_state
->getValue('mandrill_api_key'))
->set('mandrill_from_email', $form_state
->getValue('mandrill_from'))
->set('mandrill_from_name', $form_state
->getValue('mandrill_from_name'))
->set('mandrill_subaccount', $form_state
->getValue('mandrill_subaccount'))
->set('mandrill_filter_format', $form_state
->getValue('mandrill_filter_format'))
->set('mandrill_track_opens', $form_state
->getValue('mandrill_track_opens'))
->set('mandrill_track_clicks', $form_state
->getValue('mandrill_track_clicks'))
->set('mandrill_url_strip_qs', $form_state
->getValue('mandrill_url_strip_qs'))
->set('mandrill_mail_key_blacklist', $form_state
->getValue('mandrill_mail_key_blacklist'))
->set('mandrill_log_defaulted_sends', $form_state
->getValue('mandrill_log_defaulted_sends'))
->set('mandrill_analytics_domains', $form_state
->getValue('mandrill_analytics_domains'))
->set('mandrill_analytics_campaign', $form_state
->getValue('mandrill_analytics_campaign'))
->set('mandrill_process_async', $form_state
->getValue('mandrill_process_async'))
->set('mandrill_batch_log_queued', $form_state
->getValue('mandrill_batch_log_queued'))
->set('mandrill_queue_worker_timeout', $form_state
->getValue('mandrill_queue_worker_timeout'))
->save();
}