Avoid template creators being registered multiple times

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2021-02-02 19:36:31 +01:00
parent ad2033ef1d
commit 18e2e86b95
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 3 additions and 0 deletions

View File

@ -115,6 +115,9 @@ class TemplateManager implements ITemplateManager {
}
public function getTypes(): array {
if (!empty($this->types)) {
return $this->types;
}
foreach ($this->registeredTypes as $registeredType) {
$this->types[] = $registeredType();
}