function Textfield::getTranslationElement

Same name and namespace in other branches
  1. 9 core/modules/config_translation/src/FormElement/Textfield.php \Drupal\config_translation\FormElement\Textfield::getTranslationElement()
  2. 8.9.x core/modules/config_translation/src/FormElement/Textfield.php \Drupal\config_translation\FormElement\Textfield::getTranslationElement()
  3. 10 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.