LanguageConfigurationElementTest.php
Same filename in this branch
Same filename in other branches
- 9 core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php
- 9 core/modules/language/tests/language_elements_test/src/Form/LanguageConfigurationElementTest.php
- 8.9.x core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php
- 8.9.x core/modules/language/tests/language_elements_test/src/Form/LanguageConfigurationElementTest.php
- 10 core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php
- 10 core/modules/language/tests/language_elements_test/src/Form/LanguageConfigurationElementTest.php
Namespace
Drupal\language_elements_test\FormFile
-
core/
modules/ language/ tests/ language_elements_test/ src/ Form/ LanguageConfigurationElementTest.php
View source
<?php
declare (strict_types=1);
namespace Drupal\language_elements_test\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
/**
* A form containing a language select element.
*
* @internal
*/
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) {
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
LanguageConfigurationElementTest | A form containing a language select element. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.