function ElementInterface::getTranslationBuild

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

Builds a render array containing the source and translation form elements.

Parameters

\Drupal\Core\Language\LanguageInterface $source_language: The source language of the configuration object.

\Drupal\Core\Language\LanguageInterface $translation_language: The language to display the translation form for.

mixed $source_config: The configuration value of the element in the source language.

mixed $translation_config: The configuration value of the element in the language to translate to.

array $parents: Parents array for the element in the form.

string|null $base_key: (optional) Base key to be used for the elements in the form. NULL for top-level form elements.

Return value

array A render array consisting of the source and translation elements for the source value.

2 methods override ElementInterface::getTranslationBuild()
FormElementBase::getTranslationBuild in core/modules/config_translation/src/FormElement/FormElementBase.php
Builds a render array containing the source and translation form elements.
ListElement::getTranslationBuild in core/modules/config_translation/src/FormElement/ListElement.php
Builds a render array containing the source and translation form elements.

File

core/modules/config_translation/src/FormElement/ElementInterface.php, line 46

Class

ElementInterface
Provides an interface for configuration translation form elements.

Namespace

Drupal\config_translation\FormElement

Code

public function getTranslationBuild(LanguageInterface $source_language, LanguageInterface $translation_language, $source_config, $translation_config, array $parents, $base_key = NULL);

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