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
|
* This variable is set in register() method as $baseDirectory/$path
|
||||||
*/
|
*/
|
||||||
protected $registeredPath;
|
protected $registeredPath;
|
||||||
|
/**
|
||||||
|
* @var int ID of module
|
||||||
|
*/
|
||||||
|
protected $moduleId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set base path
|
* Set base path
|
||||||
@@ -44,6 +48,16 @@ class TemplateRegistrator
|
|||||||
$this->baseDirectory = $baseDirectory;
|
$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
|
* Set namespace for registered template path
|
||||||
*
|
*
|
||||||
@@ -172,6 +186,7 @@ class TemplateRegistrator
|
|||||||
'template_name' => $templateName,
|
'template_name' => $templateName,
|
||||||
'name' => $templateName,
|
'name' => $templateName,
|
||||||
'path' => $templatePathId,
|
'path' => $templatePathId,
|
||||||
|
'module_id' => $this->moduleId,
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'editable' => 1
|
'editable' => 1
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user