public function RoleWatchdogSettingsForm::submitForm in Role Watchdog 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/ RoleWatchdogSettingsForm.php, line 63
Class
- RoleWatchdogSettingsForm
- Class RoleWatchdogSettingsForm.
Namespace
Drupal\role_watchdog\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$this
->config('role_watchdog.settings')
->set('role_watchdog_monitor_roles', $form_state
->getValue('role_watchdog_monitor_roles'))
->set('role_watchdog_notify_email', $form_state
->getValue('role_watchdog_notify_email'))
->save();
}