mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Optimize common code paths using Template class
This commit is contained in:
parent
8d3a332344
commit
6a2a2826ec
3 changed files with 8 additions and 8 deletions
|
|
@ -94,8 +94,8 @@ class HTMLDisplayHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$oTemplate = new Rhymix\Framework\Template;
|
$oTemplate = new Rhymix\Framework\Template($template_path, $template_file);
|
||||||
$output = $oTemplate->compile($template_path, $template_file);
|
$output = $oTemplate->compile();
|
||||||
|
|
||||||
// add .x div for adminitration pages
|
// add .x div for adminitration pages
|
||||||
if(Context::getResponseMethod() == 'HTML')
|
if(Context::getResponseMethod() == 'HTML')
|
||||||
|
|
@ -300,8 +300,8 @@ class HTMLDisplayHandler
|
||||||
{
|
{
|
||||||
$this->_loadDesktopJSCSS();
|
$this->_loadDesktopJSCSS();
|
||||||
}
|
}
|
||||||
$oTemplate = new Rhymix\Framework\Template;
|
$oTemplate = new Rhymix\Framework\Template('./common/tpl', 'common_layout');
|
||||||
$output = $oTemplate->compile('./common/tpl', 'common_layout');
|
$output = $oTemplate->compile();
|
||||||
|
|
||||||
// replace the user-defined-language
|
// replace the user-defined-language
|
||||||
$output = Context::replaceUserLang($output);
|
$output = Context::replaceUserLang($output);
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ class RawDisplayHandler
|
||||||
$tpl_file = $oModule->getTemplateFile();
|
$tpl_file = $oModule->getTemplateFile();
|
||||||
if ($tpl_path && $tpl_file)
|
if ($tpl_path && $tpl_file)
|
||||||
{
|
{
|
||||||
$oTemplate = Rhymix\Framework\Template::getInstance();
|
$oTemplate = new Rhymix\Framework\Template($tpl_path, $tpl_file);
|
||||||
$output = $oTemplate->compile($tpl_path, $tpl_file);
|
$output = $oTemplate->compile();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -218,8 +218,8 @@ class ModuleObject extends BaseObject
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$oTemplate = Rhymix\Framework\Template::getInstance();
|
$oTemplate = new Rhymix\Framework\Template('modules/admin/tpl', '_admin_common.html');
|
||||||
$oTemplate->compile('modules/admin/tpl', '_admin_common.html');
|
$oTemplate->compile();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue