Add form template ability to transform to form entity

[MAILPOET-2810]
This commit is contained in:
Rostislav Wolny
2020-08-05 15:34:06 +02:00
committed by Veljko V
parent 9155b8d95a
commit 04e431dae5
2 changed files with 11 additions and 5 deletions

View File

@@ -25,11 +25,7 @@ class TemplateRepository {
}
/** @var Template $template */
$template = new $this->templates[$templateId]();
$formEntity = new FormEntity($template->getName());
$formEntity->setBody($template->getBody());
$formEntity->setSettings($template->getSettings());
$formEntity->setStyles($template->getStyles());
return $formEntity;
return $template->toFormEntity();
}
/**