You are here

public static function InlineEntityFormBase::removeTranslatabilityClue in Inline Entity Form 8

After-build callback for removing the translatability clue from the widget.

IEF expects the entity reference field to not be translatable, to avoid different translations having different references. However, that causes ContentTranslationHandler::addTranslatabilityClue() to add an "(all languages)" suffix to the widget title. That suffix is incorrect, since IEF does ensure that specific entity translations are being edited.

File

src/Plugin/Field/FieldWidget/InlineEntityFormBase.php, line 485

Class

InlineEntityFormBase
Inline entity form widget base class.

Namespace

Drupal\inline_entity_form\Plugin\Field\FieldWidget

Code

public static function removeTranslatabilityClue(array $element, FormStateInterface $form_state) {
  $element['#title'] = $element['#field_title'];
  return $element;
}