public function MessageSubscribeAdminSettings::submitForm in Message Subscribe 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/ MessageSubscribeAdminSettings.php, line 23
Class
- MessageSubscribeAdminSettings
- Settings form for Message Subscribe.
Namespace
Drupal\message_subscribe\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$config = $this
->config('message_subscribe.settings');
foreach ([
'use_queue',
'notify_own_actions',
'flag_prefix',
'debug_mode',
] as $variable) {
$config
->set($variable, $form_state
->getValue($variable));
}
$config
->set('default_notifiers', array_values($form_state
->getValue('default_notifiers')));
$config
->save();
}