diff --git a/src/CurrentTranslationLoader.php b/src/CurrentTranslationLoader.php index 946e3af..4ee460b 100644 --- a/src/CurrentTranslationLoader.php +++ b/src/CurrentTranslationLoader.php @@ -41,6 +41,11 @@ public function flush() } } + public function detach(TranslatableInterface $translatable) + { + unset($this->managedEntities[$this->getId($translatable)]); + } + /** * @param TranslatableInterface $entity */ @@ -66,6 +71,7 @@ public function initializeCurrentTranslation(TranslatableInterface $entity) */ private function initializeFallbackTranslation(TranslatableInterface $entity) { + /** @var TranslationService $translationService */ $translationService = $this->container->get('object_bg.translation.service.translation'); $fallbackLocales = $translationService->getFallbackLocales();