public function DomainLangNegotiationSessionForm::submitForm in Domain Lang 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 NegotiationSessionForm::submitForm
File
- src/
Form/ DomainLangNegotiationSessionForm.php, line 83
Class
- DomainLangNegotiationSessionForm
- Configure the session language negotiation method for this site.
Namespace
Drupal\domain_lang\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this
->config($this->languageNegotiationConfig)
->set('session.parameter', $form_state
->getValue('language_negotiation_session_param'))
->save();
$form_state
->disableRedirect();
$this
->messenger()
->addStatus($this
->t('The configuration options have been saved.'));
}