if ($apiAware) { $translations->
addFlags(new ApiAware());
$translatedField->
addFlags(new ApiAware());
} $collection->
add($translatedField);
} unset($field);
$registry =
$container->
get(DefinitionInstanceRegistry::
class);
if (!
$registry instanceof DefinitionInstanceRegistry
) { throw new ServiceNotFoundException(DefinitionInstanceRegistry::
class);
} $translation = DynamicTranslationEntityDefinition::
create($entityName,
$translated,
$container);
$container->
set($translation->
getEntityName(),
$translation);
$container->
set($translation->
getEntityName() . '.repository', self::
createRepository($container,
$translation));
$registry->
register($translation,
$translation->
getEntityName());
return $collection;
}