function NegotiationBrowserForm::submitForm
Same name in other branches
- 9 core/modules/language/src/Form/NegotiationBrowserForm.php \Drupal\language\Form\NegotiationBrowserForm::submitForm()
- 8.9.x core/modules/language/src/Form/NegotiationBrowserForm.php \Drupal\language\Form\NegotiationBrowserForm::submitForm()
- 10 core/modules/language/src/Form/NegotiationBrowserForm.php \Drupal\language\Form\NegotiationBrowserForm::submitForm()
Overrides ConfigFormBase::submitForm
File
-
core/
modules/ language/ src/ Form/ NegotiationBrowserForm.php, line 191
Class
- NegotiationBrowserForm
- Configure the browser language negotiation method for this site.
Namespace
Drupal\language\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$mappings = $form_state->get('mappings');
if (!empty($mappings)) {
$config = $this->config('language.mappings');
$config->setData([
'map' => $mappings,
]);
$config->save();
}
parent::submitForm($form, $form_state);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.