mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix loading fixtures for doc generator template
This commit is contained in:
parent
f206fdb08c
commit
789eeadb40
@ -13,7 +13,8 @@ namespace Chill\DocGeneratorBundle\DataFixtures\ORM;
|
||||
|
||||
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
|
||||
use Chill\DocStoreBundle\Entity\StoredObject;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Service\DocGenerator\AccompanyingPeriodContext;
|
||||
use DateTime;
|
||||
use Doctrine\Common\DataFixtures\AbstractFixture;
|
||||
use Doctrine\Persistence\ObjectManager;
|
||||
@ -35,8 +36,9 @@ class LoadDocGeneratorTemplate extends AbstractFixture
|
||||
'iv' => '[86,231,83,148,117,107,149,173,130,19,105,194,224,145,8,48]',
|
||||
'type' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
],
|
||||
'context' => 'Chill\DocGeneratorBundle\Context\HouseholdMemberSelectionContext',
|
||||
'entities' => [AccompanyingPeriodWorkEvaluation::class],
|
||||
'context' => AccompanyingPeriodContext::class,
|
||||
'entity' => AccompanyingPeriod::class,
|
||||
'options' => ['mainPerson' => false, 'person1' => false, 'person2' => false],
|
||||
], [
|
||||
'name' => ['fr' => 'AIDE ALIMENTAIRE'],
|
||||
'desc' => 'stocké sur openstack comedienbe',
|
||||
@ -46,8 +48,9 @@ class LoadDocGeneratorTemplate extends AbstractFixture
|
||||
'iv' => '[86,231,83,148,117,107,149,173,130,19,105,194,224,145,8,48]',
|
||||
'type' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
],
|
||||
'context' => 'Chill\DocGeneratorBundle\Context\HouseholdMemberSelectionContext',
|
||||
'entities' => ['Chill\PersonBundle\Entity\AccompanyingPeriod', 'Chill\PersonBundle\Entity\SocialWork\SocialAction', AccompanyingPeriodWorkEvaluation::class],
|
||||
'context' => AccompanyingPeriodContext::class,
|
||||
'entity' => AccompanyingPeriod::class,
|
||||
'options' => ['mainPerson' => false, 'person1' => false, 'person2' => false],
|
||||
],
|
||||
];
|
||||
|
||||
@ -68,11 +71,11 @@ class LoadDocGeneratorTemplate extends AbstractFixture
|
||||
->setDescription($template['desc'])
|
||||
->setFile($newStoredObj)
|
||||
->setContext($template['context'])
|
||||
->setEntities($template['entities']);
|
||||
->setEntity($template['entity'])
|
||||
->setOptions($template['options']);
|
||||
|
||||
$manager->persist($newTemplate);
|
||||
|
||||
$manager->flush();
|
||||
}
|
||||
$manager->flush();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user