created and updated traits added + template property added to Document entity

This commit is contained in:
2022-01-31 11:13:22 +01:00
committed by Julien Fastré
parent 58c8373c81
commit 1c055e842e
3 changed files with 342 additions and 4 deletions

View File

@@ -241,7 +241,8 @@ class AccompanyingPeriodContext implements
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void
{
$doc = new AccompanyingCourseDocument();
$doc->setTitle($this->translatableStringHelper->localize($template->getName()))
$doc->setTemplate($template)
->setTitle($this->translatableStringHelper->localize($template->getName()))
->setDate(new DateTime())
->setDescription($this->translatableStringHelper->localize($template->getName()))
->setCourse($entity)