소스 검색

fixed getTranslationFromContext on materio_commerce/src/EntityAutocompleteMatcher.php

bach 3 년 전
부모
커밋
fab870def8
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      web/modules/custom/materio_commerce/src/EntityAutocompleteMatcher.php

+ 1 - 1
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.