FEATURE: add support for registering template paths with module id
This commit is contained in:
@@ -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
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user