['fr' => 'FORMULAIRE AEB'], 'desc' => 'stocké sur openstack comedienbe', 'file' => 'FORMULAIRE_AEB.docx', 'context' => 'Chill\DocGeneratorBundle\Context\HouseholdMemberSelectionContext', 'entities' => ['Chill\PersonBundle\Entity\AccompanyingPeriod', 'Chill\PersonBundle\Entity\SocialWork\SocialAction'], ], [ 'name' => ['fr' => 'AIDE ALIMENTAIRE'], 'desc' => 'stocké sur openstack comedienbe', 'file' => 'AIDE_ALIMENTAIRE.docx', 'context' => 'Chill\DocGeneratorBundle\Context\HouseholdMemberSelectionContext', 'entities' => ['Chill\PersonBundle\Entity\AccompanyingPeriod', 'Chill\PersonBundle\Entity\SocialWork\SocialAction'], ], ]; foreach ($templates as $template) { print('Adding doc generator templates '.$template['file'].")\n"); $newTemplate = (new DocGeneratorTemplate()) ->setName($template['name']) ->setDescription($template['desc']) ->setFile($template['file']) ->setContext($template['context']) ->setEntities($template['entities']) ; $manager->persist($newTemplate); $manager->flush(); } } }