function NegotiationUrlForm::submitForm
Same name in other branches
- 9 core/modules/language/src/Form/NegotiationUrlForm.php \Drupal\language\Form\NegotiationUrlForm::submitForm()
- 8.9.x core/modules/language/src/Form/NegotiationUrlForm.php \Drupal\language\Form\NegotiationUrlForm::submitForm()
- 11.x core/modules/language/src/Form/NegotiationUrlForm.php \Drupal\language\Form\NegotiationUrlForm::submitForm()
Overrides ConfigFormBase::submitForm
File
-
core/
modules/ language/ src/ Form/ NegotiationUrlForm.php, line 214
Class
- NegotiationUrlForm
- Configure the URL language negotiation method for this site.
Namespace
Drupal\language\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
// Save selected format (prefix or domain).
$this->config('language.negotiation')
->set('url.source', $form_state->getValue('language_negotiation_url_part'))
->set('url.prefixes', $form_state->getValue('prefix'))
->set('url.domains', $form_state->getValue('domain'))
->save();
parent::submitForm($form, $form_state);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.