You are here

class LanguageConfigurationElementTest in Drupal 10

Same name in this branch
  1. 10 core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php \Drupal\Tests\language\Functional\LanguageConfigurationElementTest
  2. 10 core/modules/language/tests/language_elements_test/src/Form/LanguageConfigurationElementTest.php \Drupal\language_elements_test\Form\LanguageConfigurationElementTest
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
  2. 9 core/modules/language/tests/language_elements_test/src/Form/LanguageConfigurationElementTest.php \Drupal\language_elements_test\Form\LanguageConfigurationElementTest

A form containing a language select element.

@internal

Hierarchy

Expanded class hierarchy of LanguageConfigurationElementTest

1 string reference to 'LanguageConfigurationElementTest'
language_elements_test.routing.yml in core/modules/language/tests/language_elements_test/language_elements_test.routing.yml
core/modules/language/tests/language_elements_test/language_elements_test.routing.yml

File

core/modules/language/tests/language_elements_test/src/Form/LanguageConfigurationElementTest.php, line 13

Namespace

Drupal\language_elements_test\Form
View source
class LanguageConfigurationElementTest extends FormBase {

  /**
   * {@inheritdoc}
   */
  public function getFormId() {
    return 'language_elements_configuration_element_test';
  }

  /**
   * {@inheritdoc}
   */
  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;
  }

  /**
   * {@inheritdoc}
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
  }

}

Members