protected function getTranslatableRespositories() : Collection
{
$collection = new ArrayCollection();
$metadata = $this->doctrineHelper->getAllMetadata();
foreach ($metadata as $classMetadata) {
$reflectionClass = $classMetadata->getReflectionClass();
if ($reflectionClass->implementsInterface(LocaleAwareInterface::class)) {
$repository = $this->entityManager->getRepository($reflectionClass->getName());
$collection->add($repository);
}
}
return $collection;
}