FEATURE #1524: merge views into one directory

This commit is contained in:
Michal Kváček
2016-03-31 16:47:40 +02:00
parent 980fec83c0
commit 7a51c913d3
4 changed files with 56 additions and 7 deletions
@@ -21,7 +21,6 @@ class TemplateRegistrator
protected $namespace;
/**
* @var string absolute path to currently registered directory
*
* This variable is set in register() method as $baseDirectory/$path
*/
protected $registeredPath;
@@ -78,7 +77,6 @@ class TemplateRegistrator
/**
* Registers new template path.
*
* This method registeres given path itself with all subdirectories
*
* @param string $path path relatively to root of the project
@@ -140,7 +138,13 @@ class TemplateRegistrator
{
// skip custom directories (contains updated templates only)
$dirName = basename($path);
if ($dirName == Template::EDITED_TEMPLATES_DIRECTORY) {
$ignoredDirectories = [
Template::EDITED_TEMPLATES_DIRECTORY,
Template::ASSETS_DIRECTORY,
Template::MODULES_DIRECTORY
];
if (in_array($dirName, $ignoredDirectories)) {
return;
}
@@ -156,7 +160,6 @@ class TemplateRegistrator
/**
* Registers all templates
*
* This method takes all templates in given directory and registers them into database. Templates registered in
* this way may be used for further manipulation.
*
@@ -259,7 +262,6 @@ class TemplateRegistrator
/**
* Get template name
*
* Converts path to template to corresponding name
*
* @param $template