public function SitewideAlertConfigForm::submitForm in Sitewide Alert 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/ SitewideAlertConfigForm.php, line 75
Class
- SitewideAlertConfigForm
- Class SitewideAlertConfigForm.
Namespace
Drupal\sitewide_alert\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$this
->config('sitewide_alert.settings')
->set('show_on_admin', $form_state
->getValue('show_on_admin'))
->set('alert_styles', $form_state
->getValue('alert_styles'))
->set('refresh_interval', $form_state
->getValue('refresh_interval'))
->set('automatic_refresh', $form_state
->getValue('automatic_refresh'))
->save();
}