various improvements

This commit is contained in:
2021-12-04 01:13:55 +01:00
parent 6c1a946608
commit 063ceb2c53
17 changed files with 163 additions and 69 deletions

View File

@@ -113,10 +113,11 @@ final class DocGeneratorTemplateController extends AbstractController
if ($form->isSubmitted() && $form->isValid()) {
$contextGenerationData = $form->getData();
} elseif (!$form->isSubmitted() || ($form->isSubmitted() && !$form->isValid())) {
$template = '@ChillDocGenerator/Generator/basic_form.html.twig';
$templateOptions = ['entity' => $entity, 'form' => $form->createView(), 'template' => $template];
$templatePath = '@ChillDocGenerator/Generator/basic_form.html.twig';
$templateOptions = ['entity' => $entity, 'form' => $form->createView(),
'template' => $template, 'context' => $context];
return $this->render($template, $templateOptions);
return $this->render($templatePath, $templateOptions);
}
}