public function NegotiationSelectedForm::submitForm

Implements \Drupal\Core\Form\FormInterface::submitForm().

Overrides SystemConfigFormBase::submitForm

File

drupal/core/modules/language/lib/Drupal/language/Form/NegotiationSelectedForm.php, line 43
Contains \Drupal\language\Form\NegotiationSelectedForm.

Class

NegotiationSelectedForm
Configure the selected language negotiation method for this site.

Namespace

Drupal\language\Form

Code

public function submitForm(array &$form, array &$form_state) {
  $this->configFactory
    ->get('language.negotiation')
    ->set('selected_langcode', $form_state['values']['selected_langcode'])
    ->save();
  parent::submitForm($form, $form_state);
}