fixed getTranslationFromContext on materio_commerce/src/EntityAutocompleteMatcher.php

This commit is contained in:
Bachir Soussi Chiadmi 2022-02-22 13:59:14 +01:00
parent 99384d32c4
commit fab870def8
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ class EntityAutocompleteMatcher extends \Drupal\Core\Entity\EntityAutocompleteMa
foreach ($values as $entity_id => $label) {
$entity = \Drupal::entityTypeManager()->getStorage($target_type)->load($entity_id);
$entity = \Drupal::entityManager()->getTranslationFromContext($entity);
$entity = \Drupal::service('entity.repository')->getTranslationFromContext($entity);
$key = $label . ' (' . $entity_id . ')';
// Strip things like starting/trailing white spaces, line breaks and tags.