mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Data injection in to file on openstack
This commit is contained in:
@@ -68,14 +68,17 @@ class DocGeneratorTemplateController extends AbstractController
|
||||
|
||||
if ($template->getContext() == HouseholdMemberSelectionContext::class) {
|
||||
$context = new HouseholdMemberSelectionContext();
|
||||
// $datas = $context->getData($entity);
|
||||
$datas = [];
|
||||
$datas = $context->getData($entity);
|
||||
} else {
|
||||
throw new \Exception("Not implemented", 1);
|
||||
}
|
||||
|
||||
$templateProcessor = new TemplateProcessor($tmpfname);
|
||||
$templateProcessor->setValues(array('firstname' => 'John', 'lastname' => 'Doe'));
|
||||
|
||||
// TODO foreach ($datas['setValue'] as $key => $value) {
|
||||
foreach ($datas['cloneRowAndSetValues'] as $cloneRowAndSetValues) {
|
||||
$templateProcessor->cloneRowAndSetValues($cloneRowAndSetValues[0], $cloneRowAndSetValues[1]);
|
||||
}
|
||||
|
||||
$tmpfname2 = tempnam(sys_get_temp_dir(), 'DOC_GENERATED');
|
||||
$templateProcessor->saveAs($tmpfname2);
|
||||
|
Reference in New Issue
Block a user