public function NegotiationSelectedForm::submitForm in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/language/src/Form/NegotiationSelectedForm.php \Drupal\language\Form\NegotiationSelectedForm::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/ NegotiationSelectedForm.php, line 51 - Contains \Drupal\language\Form\NegotiationSelectedForm.
Class
- NegotiationSelectedForm
- Configure the selected language negotiation method for this site.
Namespace
Drupal\language\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this
->config('language.negotiation')
->set('selected_langcode', $form_state
->getValue('selected_langcode'))
->save();
parent::submitForm($form, $form_state);
}