You are here

public function LanguageConfigurationElementTest::buildForm in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/language/tests/language_elements_test/src/Form/LanguageConfigurationElementTest.php \Drupal\language_elements_test\Form\LanguageConfigurationElementTest::buildForm()
  2. 9 core/modules/language/tests/language_elements_test/src/Form/LanguageConfigurationElementTest.php \Drupal\language_elements_test\Form\LanguageConfigurationElementTest::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\Form

Code

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;
}