Avoid template creators being registered multiple times
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
ad2033ef1d
commit
18e2e86b95
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue