public function DomainLangNegotiationSelectedForm::submitForm in Domain Lang 8
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 NegotiationSelectedForm::submitForm
File
- src/
Form/ DomainLangNegotiationSelectedForm.php, line 83
Class
- DomainLangNegotiationSelectedForm
- Configure the selected language negotiation method for this site.
Namespace
Drupal\domain_lang\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this
->config($this->languageNegotiationConfig)
->set('selected_langcode', $form_state
->getValue('selected_langcode'))
->save();
$form_state
->disableRedirect();
$this
->messenger()
->addStatus($this
->t('The configuration options have been saved.'));
}