mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
normalization for docgen:read: add groups and so on (wip)
This commit is contained in:
@@ -90,11 +90,6 @@ final class DocGeneratorTemplateController extends AbstractController
|
||||
int $entityId,
|
||||
Request $request
|
||||
): Response {
|
||||
$entity = $this->getDoctrine()->getRepository($entityClassName)->find($entityId);
|
||||
|
||||
if (null === $entity) {
|
||||
throw new NotFoundHttpException("Entity with classname {$entityClassName} and id {$entityId} is not found");
|
||||
}
|
||||
|
||||
try {
|
||||
$context = $this->contextManager->getContextByDocGeneratorTemplate($template);
|
||||
@@ -102,6 +97,12 @@ final class DocGeneratorTemplateController extends AbstractController
|
||||
throw new NotFoundHttpException($e->getMessage(), $e);
|
||||
}
|
||||
|
||||
$entity = $this->getDoctrine()->getRepository($context->getEntityClass())->find($entityId);
|
||||
|
||||
if (null === $entity) {
|
||||
throw new NotFoundHttpException("Entity with classname {$entityClassName} and id {$entityId} is not found");
|
||||
}
|
||||
|
||||
$contextGenerationData = [];
|
||||
|
||||
if ($context instanceof DocGeneratorContextWithPublicFormInterface
|
||||
|
Reference in New Issue
Block a user