FIX: fix duplicate :: in template names

This commit is contained in:
Michal Kváček
2016-09-26 16:31:49 +02:00
parent 98fe43e12c
commit 358027a8e0
@@ -68,7 +68,7 @@ class TemplateRegistrator
*/ */
public function setNamespace($namespace) public function setNamespace($namespace)
{ {
$this->namespace = $namespace . '::'; $this->namespace = $namespace;
} }
/** /**
@@ -102,6 +102,9 @@ class TemplateRegistrator
$this->unsetNamespace(); $this->unsetNamespace();
} }
/**
* Save templates into database
*/
public function saveTemplates() public function saveTemplates()
{ {
if (!is_array($this->paths) || empty($this->paths)) { if (!is_array($this->paths) || empty($this->paths)) {
@@ -109,7 +112,7 @@ class TemplateRegistrator
} }
foreach ($this->paths as $path) { foreach ($this->paths as $path) {
$this->setNamespace($path['namespace']); $this->setNamespace($path['namespace'] . '::');
$this->setModuleId($path['moduleId']); $this->setModuleId($path['moduleId']);
$this->setBaseDirectory($path['baseDirectory']); $this->setBaseDirectory($path['baseDirectory']);