FEATURE: add support for registering template paths with module id

This commit is contained in:
Michal Kváček
2016-03-09 22:07:50 +01:00
parent bb7106d706
commit 8aa2ebd0b0
@@ -25,6 +25,10 @@ class TemplateRegistrator
* This variable is set in register() method as $baseDirectory/$path
*/
protected $registeredPath;
/**
* @var int ID of module
*/
protected $moduleId;
/**
* Set base path
@@ -44,6 +48,16 @@ class TemplateRegistrator
$this->baseDirectory = $baseDirectory;
}
/**
* Set module ID for registered path
*
* @param int $moduleId
*/
public function setModuleId($moduleId)
{
$this->moduleId = $moduleId;
}
/**
* Set namespace for registered template path
*
@@ -172,6 +186,7 @@ class TemplateRegistrator
'template_name' => $templateName,
'name' => $templateName,
'path' => $templatePathId,
'module_id' => $this->moduleId,
'description' => '',
'editable' => 1
];