class Textfield in Drupal 10
Same name in this branch
- 10 core/modules/config_translation/src/FormElement/Textfield.php \Drupal\config_translation\FormElement\Textfield
- 10 core/lib/Drupal/Core/Render/Element/Textfield.php \Drupal\Core\Render\Element\Textfield
- 10 core/modules/text/src/Plugin/migrate/field/d6/TextField.php \Drupal\text\Plugin\migrate\field\d6\TextField
- 10 core/modules/text/src/Plugin/migrate/field/d7/TextField.php \Drupal\text\Plugin\migrate\field\d7\TextField
Same name and namespace in other branches
- 8 core/modules/config_translation/src/FormElement/Textfield.php \Drupal\config_translation\FormElement\Textfield
- 9 core/modules/config_translation/src/FormElement/Textfield.php \Drupal\config_translation\FormElement\Textfield
Defines the textfield element for the configuration translation interface.
Hierarchy
- class \Drupal\config_translation\FormElement\FormElementBase implements ElementInterface uses StringTranslationTrait
- class \Drupal\config_translation\FormElement\Textfield
Expanded class hierarchy of Textfield
3 string references to 'Textfield'
- drupal6.php in core/
modules/ migrate_drupal/ tests/ fixtures/ drupal6.php - A database agnostic dump for testing purposes.
- EditorLoadingTest::setUp in core/
modules/ editor/ tests/ src/ Functional/ EditorLoadingTest.php - FormTestProgrammaticForm::buildForm in core/
modules/ system/ tests/ modules/ form_test/ src/ Form/ FormTestProgrammaticForm.php - Form constructor.
File
- core/
modules/ config_translation/ src/ FormElement/ Textfield.php, line 10
Namespace
Drupal\config_translation\FormElementView source
class Textfield extends FormElementBase {
/**
* {@inheritdoc}
*/
public function getTranslationElement(LanguageInterface $translation_language, $source_config, $translation_config) {
return [
'#type' => 'textfield',
] + parent::getTranslationElement($translation_language, $source_config, $translation_config);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FormElementBase:: |
protected | property | The data definition of the element this form element is for. | |
FormElementBase:: |
protected | property | The schema element this form is for. | |
FormElementBase:: |
public static | function |
Creates a form element instance from a schema definition. Overrides ElementInterface:: |
|
FormElementBase:: |
protected | function | Returns the source element for a given configuration definition. | 2 |
FormElementBase:: |
public | function |
Builds a render array containing the source and translation form elements. Overrides ElementInterface:: |
|
FormElementBase:: |
public | function |
Sets configuration based on a nested form value array. Overrides ElementInterface:: |
1 |
FormElementBase:: |
public | function | Constructs a FormElementBase. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 3 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 1 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
Textfield:: |
public | function |
Returns the translation form element for a given configuration definition. Overrides FormElementBase:: |