LanguageSelect.php
Same filename in other branches
Namespace
Drupal\Core\Render\ElementFile
-
core/
lib/ Drupal/ Core/ Render/ Element/ LanguageSelect.php
View source
<?php
namespace Drupal\Core\Render\Element;
use Drupal\Core\Language\LanguageInterface;
/**
* Provides a form element for selecting a language.
*
* This does not render an actual form element, but always returns the value of
* the default language. It is then extended by Language module via
* language_element_info_alter() to provide a proper language selector.
*
* @see language_element_info_alter()
*
* @FormElement("language_select")
*/
class LanguageSelect extends FormElement {
/**
* {@inheritdoc}
*/
public function getInfo() {
return [
'#input' => TRUE,
'#default_value' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
];
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
LanguageSelect | Provides a form element for selecting a language. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.