mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +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\DocGeneratorBundle\Entity\DocGeneratorTemplate;
|
||||||
use Chill\DocStoreBundle\Entity\StoredObject;
|
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 DateTime;
|
||||||
use Doctrine\Common\DataFixtures\AbstractFixture;
|
use Doctrine\Common\DataFixtures\AbstractFixture;
|
||||||
use Doctrine\Persistence\ObjectManager;
|
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]',
|
'iv' => '[86,231,83,148,117,107,149,173,130,19,105,194,224,145,8,48]',
|
||||||
'type' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
'type' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||||
],
|
],
|
||||||
'context' => 'Chill\DocGeneratorBundle\Context\HouseholdMemberSelectionContext',
|
'context' => AccompanyingPeriodContext::class,
|
||||||
'entities' => [AccompanyingPeriodWorkEvaluation::class],
|
'entity' => AccompanyingPeriod::class,
|
||||||
|
'options' => ['mainPerson' => false, 'person1' => false, 'person2' => false],
|
||||||
], [
|
], [
|
||||||
'name' => ['fr' => 'AIDE ALIMENTAIRE'],
|
'name' => ['fr' => 'AIDE ALIMENTAIRE'],
|
||||||
'desc' => 'stocké sur openstack comedienbe',
|
'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]',
|
'iv' => '[86,231,83,148,117,107,149,173,130,19,105,194,224,145,8,48]',
|
||||||
'type' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
'type' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||||
],
|
],
|
||||||
'context' => 'Chill\DocGeneratorBundle\Context\HouseholdMemberSelectionContext',
|
'context' => AccompanyingPeriodContext::class,
|
||||||
'entities' => ['Chill\PersonBundle\Entity\AccompanyingPeriod', 'Chill\PersonBundle\Entity\SocialWork\SocialAction', AccompanyingPeriodWorkEvaluation::class],
|
'entity' => AccompanyingPeriod::class,
|
||||||
|
'options' => ['mainPerson' => false, 'person1' => false, 'person2' => false],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -68,11 +71,11 @@ class LoadDocGeneratorTemplate extends AbstractFixture
|
|||||||
->setDescription($template['desc'])
|
->setDescription($template['desc'])
|
||||||
->setFile($newStoredObj)
|
->setFile($newStoredObj)
|
||||||
->setContext($template['context'])
|
->setContext($template['context'])
|
||||||
->setEntities($template['entities']);
|
->setEntity($template['entity'])
|
||||||
|
->setOptions($template['options']);
|
||||||
|
|
||||||
$manager->persist($newTemplate);
|
$manager->persist($newTemplate);
|
||||||
|
|
||||||
$manager->flush();
|
|
||||||
}
|
}
|
||||||
|
$manager->flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user