function Textfield::getTranslationElement

Same name in other branches
  1. 9 core/modules/config_translation/src/FormElement/Textfield.php \Drupal\config_translation\FormElement\Textfield::getTranslationElement()
  2. 10 core/modules/config_translation/src/FormElement/Textfield.php \Drupal\config_translation\FormElement\Textfield::getTranslationElement()
  3. 11.x core/modules/config_translation/src/FormElement/Textfield.php \Drupal\config_translation\FormElement\Textfield::getTranslationElement()

Overrides FormElementBase::getTranslationElement

File

core/modules/config_translation/src/FormElement/Textfield.php, line 15

Class

Textfield
Defines the textfield element for the configuration translation interface.

Namespace

Drupal\config_translation\FormElement

Code

public function getTranslationElement(LanguageInterface $translation_language, $source_config, $translation_config) {
    return [
        '#type' => 'textfield',
    ] + parent::getTranslationElement($translation_language, $source_config, $translation_config);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.