public NegotiationUrlForm::submitForm(array &$form, FormStateInterface $form_state)
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/NegotiationUrlForm.php, line 205
Class
- NegotiationUrlForm
- Configure the URL language negotiation method for this site.
Namespace
Drupal\language\Form
Code
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')) // Save new domain and prefix values. ->set('url.prefixes', $form_state->getValue('prefix')) ->set('url.domains', $form_state->getValue('domain')) ->save(); parent::submitForm($form, $form_state); }
Please login to continue.