function LanguageConfigurationElementTest::buildForm
Same name in other branches
- 9 core/modules/language/tests/language_elements_test/src/Form/LanguageConfigurationElementTest.php \Drupal\language_elements_test\Form\LanguageConfigurationElementTest::buildForm()
- 10 core/modules/language/tests/language_elements_test/src/Form/LanguageConfigurationElementTest.php \Drupal\language_elements_test\Form\LanguageConfigurationElementTest::buildForm()
- 11.x core/modules/language/tests/language_elements_test/src/Form/LanguageConfigurationElementTest.php \Drupal\language_elements_test\Form\LanguageConfigurationElementTest::buildForm()
Overrides FormInterface::buildForm
File
-
core/
modules/ language/ tests/ language_elements_test/ src/ Form/ LanguageConfigurationElementTest.php, line 25
Class
- LanguageConfigurationElementTest
- A form containing a language select element.
Namespace
Drupal\language_elements_test\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['langcode'] = [
'#title' => t('Language select'),
'#type' => 'language_select',
'#default_value' => language_get_default_langcode('entity_test', 'some_bundle'),
];
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.