function NegotiationSelectedForm::buildForm
Same name in other branches
- 9 core/modules/language/src/Form/NegotiationSelectedForm.php \Drupal\language\Form\NegotiationSelectedForm::buildForm()
- 10 core/modules/language/src/Form/NegotiationSelectedForm.php \Drupal\language\Form\NegotiationSelectedForm::buildForm()
- 11.x core/modules/language/src/Form/NegotiationSelectedForm.php \Drupal\language\Form\NegotiationSelectedForm::buildForm()
Overrides ConfigFormBase::buildForm
File
-
core/
modules/ language/ src/ Form/ NegotiationSelectedForm.php, line 33
Class
- NegotiationSelectedForm
- Configure the selected language negotiation method for this site.
Namespace
Drupal\language\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this->config('language.negotiation');
$form['selected_langcode'] = [
'#type' => 'language_select',
'#title' => $this->t('Language'),
'#languages' => LanguageInterface::STATE_CONFIGURABLE | LanguageInterface::STATE_SITE_DEFAULT,
'#default_value' => $config->get('selected_langcode'),
];
return parent::buildForm($form, $form_state);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.