class Textfield

Same name in this branch
  1. 9 core/modules/text/src/Plugin/migrate/field/d6/TextField.php \Drupal\text\Plugin\migrate\field\d6\TextField
  2. 9 core/modules/text/src/Plugin/migrate/field/d7/TextField.php \Drupal\text\Plugin\migrate\field\d7\TextField
  3. 9 core/lib/Drupal/Core/Render/Element/Textfield.php \Drupal\Core\Render\Element\Textfield
Same name in other branches
  1. 8.9.x core/modules/config_translation/src/FormElement/Textfield.php \Drupal\config_translation\FormElement\Textfield
  2. 8.9.x core/modules/text/src/Plugin/migrate/field/d6/TextField.php \Drupal\text\Plugin\migrate\field\d6\TextField
  3. 8.9.x core/modules/text/src/Plugin/migrate/field/d7/TextField.php \Drupal\text\Plugin\migrate\field\d7\TextField
  4. 8.9.x core/modules/text/src/Plugin/migrate/cckfield/TextField.php \Drupal\text\Plugin\migrate\cckfield\TextField
  5. 8.9.x core/lib/Drupal/Core/Render/Element/Textfield.php \Drupal\Core\Render\Element\Textfield
  6. 10 core/modules/config_translation/src/FormElement/Textfield.php \Drupal\config_translation\FormElement\Textfield
  7. 10 core/modules/text/src/Plugin/migrate/field/d6/TextField.php \Drupal\text\Plugin\migrate\field\d6\TextField
  8. 10 core/modules/text/src/Plugin/migrate/field/d7/TextField.php \Drupal\text\Plugin\migrate\field\d7\TextField
  9. 10 core/lib/Drupal/Core/Render/Element/Textfield.php \Drupal\Core\Render\Element\Textfield
  10. 11.x core/modules/config_translation/src/FormElement/Textfield.php \Drupal\config_translation\FormElement\Textfield
  11. 11.x core/modules/text/src/Plugin/migrate/field/d6/TextField.php \Drupal\text\Plugin\migrate\field\d6\TextField
  12. 11.x core/modules/text/src/Plugin/migrate/field/d7/TextField.php \Drupal\text\Plugin\migrate\field\d7\TextField
  13. 11.x core/lib/Drupal/Core/Render/Element/Textfield.php \Drupal\Core\Render\Element\Textfield

Defines the textfield element for the configuration translation interface.

Hierarchy

Expanded class hierarchy of Textfield

27 string references to 'Textfield'
ContentTranslationHandler::addTranslatabilityClue in core/modules/content_translation/src/ContentTranslationHandler.php
Adds a clue about the form element translatability.
ElementTest::testPlaceHolderText in core/modules/system/tests/src/Functional/Form/ElementTest.php
Tests placeholder text for elements that support placeholders.
EntityDisplayFormBaseTest::testCopyFormValuesToEntity in core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayFormBaseTest.php
@covers ::copyFormValuesToEntity
EntityField::multiple_options_form in core/modules/views/src/Plugin/views/field/EntityField.php
Provide options for multiple value fields.
FieldAttachOtherTest::testEntityFormDisplayBuildForm in core/modules/field/tests/src/Kernel/FieldAttachOtherTest.php
Tests \Drupal\Core\Entity\Display\EntityFormDisplayInterface::buildForm().

... See full list

File

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

Namespace

Drupal\config_translation\FormElement
View 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

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
FormElementBase::$definition protected property The data definition of the element this form element is for.
FormElementBase::$element protected property The schema element this form is for.
FormElementBase::create public static function Creates a form element instance from a schema definition. Overrides ElementInterface::create
FormElementBase::getSourceElement protected function Returns the source element for a given configuration definition. 2
FormElementBase::getTranslationBuild public function Builds a render array containing the source and translation form elements. Overrides ElementInterface::getTranslationBuild
FormElementBase::setConfig public function Sets configuration based on a nested form value array. Overrides ElementInterface::setConfig 1
FormElementBase::__construct public function Constructs a FormElementBase.
StringTranslationTrait::$stringTranslation protected property The string translation service. 3
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.
Textfield::getTranslationElement public function Returns the translation form element for a given configuration definition. Overrides FormElementBase::getTranslationElement

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