public function NegotiationSessionForm::submitForm in Drupal 10
Same name and namespace in other branches
- 8 core/modules/language/src/Form/NegotiationSessionForm.php \Drupal\language\Form\NegotiationSessionForm::submitForm()
- 9 core/modules/language/src/Form/NegotiationSessionForm.php \Drupal\language\Form\NegotiationSessionForm::submitForm()
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
- core/
modules/ language/ src/ Form/ NegotiationSessionForm.php, line 49
Class
- NegotiationSessionForm
- Configure the session language negotiation method for this site.
Namespace
Drupal\language\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this
->config('language.negotiation')
->set('session.parameter', $form_state
->getValue('language_negotiation_session_param'))
->save();
parent::submitForm($form, $form_state);
}