public function RedirectLogoutSettings::submitForm in Redirect after logout 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/ RedirectLogoutSettings.php, line 140
Class
- RedirectLogoutSettings
- Class RedirectLogoutSettings.
Namespace
Drupal\redirect_after_logout\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('redirect_after_logout.settings');
$config
->set('destination', $form_state
->getValue('redirect_after_logout_destination'));
$config
->set('message', $form_state
->getValue('redirect_after_logout_message'));
$config
->save();
parent::submitForm($form, $form_state);
}