X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FEntity%2FEntityRepository.php;h=37a89d793ebd4cd8548af1079f0e9def8be134a7;hb=refs%2Fheads%2Fd864;hp=986cc50b5433d3e903ff4b4bc20056c813fb8987;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/lib/Drupal/Core/Entity/EntityRepository.php b/web/core/lib/Drupal/Core/Entity/EntityRepository.php index 986cc50b5..37a89d793 100644 --- a/web/core/lib/Drupal/Core/Entity/EntityRepository.php +++ b/web/core/lib/Drupal/Core/Entity/EntityRepository.php @@ -5,7 +5,7 @@ namespace Drupal\Core\Entity; use Drupal\Core\Config\Entity\ConfigEntityTypeInterface; use Drupal\Core\Language\LanguageInterface; use Drupal\Core\Language\LanguageManagerInterface; -use Drupal\Core\TypedData\TranslatableInterface; +use Drupal\Core\TypedData\TranslatableInterface as TranslatableDataInterface; /** * Provides several mechanisms for retrieving entities. @@ -82,7 +82,7 @@ class EntityRepository implements EntityRepositoryInterface { public function getTranslationFromContext(EntityInterface $entity, $langcode = NULL, $context = []) { $translation = $entity; - if ($entity instanceof TranslatableInterface && count($entity->getTranslationLanguages()) > 1) { + if ($entity instanceof TranslatableDataInterface && count($entity->getTranslationLanguages()) > 1) { if (empty($langcode)) { $langcode = $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->getId(); $entity->addCacheContexts(['languages:' . LanguageInterface::TYPE_CONTENT]);