From fab870def85238b816cbde4101a0b5c4a114e026 Mon Sep 17 00:00:00 2001 From: bach Date: Tue, 22 Feb 2022 13:59:14 +0100 Subject: [PATCH] fixed getTranslationFromContext on materio_commerce/src/EntityAutocompleteMatcher.php --- .../custom/materio_commerce/src/EntityAutocompleteMatcher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/modules/custom/materio_commerce/src/EntityAutocompleteMatcher.php b/web/modules/custom/materio_commerce/src/EntityAutocompleteMatcher.php index addd2021..b25630d6 100644 --- a/web/modules/custom/materio_commerce/src/EntityAutocompleteMatcher.php +++ b/web/modules/custom/materio_commerce/src/EntityAutocompleteMatcher.php @@ -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.