Rename form template parent class

[MAILPOET-2810]
This commit is contained in:
Rostislav Wolny
2020-08-05 16:32:43 +02:00
committed by Veljko V
parent 7087bd3b3c
commit 79c70c8341
6 changed files with 12 additions and 12 deletions

View File

@@ -17,19 +17,19 @@ class TemplateRepository {
'demo_form' => DemoForm::class,
];
public function getFormTemplate(string $templateId): Template {
public function getFormTemplate(string $templateId): FormTemplate {
if (!isset($this->templates[$templateId])) {
throw UnexpectedValueException::create()
->withErrors(["Template with id $templateId doesn't exist."]);
}
/** @var Template $template */
/** @var FormTemplate $template */
$template = new $this->templates[$templateId]();
return $template;
}
/**
* @param string[] $templateIds
* @return Template[] associative array with template ids as keys
* @return FormTemplate[] associative array with template ids as keys
*/
public function getFormTemplates(array $templateIds): array {
$result = [];