本文整理汇总了PHP中OA_Admin_Template::init方法的典型用法代码示例。如果您正苦于以下问题:PHP OA_Admin_Template::init方法的具体用法?PHP OA_Admin_Template::init怎么用?PHP OA_Admin_Template::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OA_Admin_Template
的用法示例。
在下文中一共展示了OA_Admin_Template::init方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
function init($templateName, $adminGroupName)
{
parent::init($templateName);
//since previous version was using relative path and $adminGroupName was
//ignored (and thus could be incorect and cannot be relied on), for backward compatibility check if absolute path is correct
//if not use relative one
$pluginBaseDir = $this->get_template_vars('pluginBaseDir');
//with trailing /
$pluginTemplateDir = $this->get_template_vars('pluginTemplateDir');
//with trailing /
$absoluteTemplateDir = $pluginBaseDir . $adminGroupName . $pluginTemplateDir;
$this->template_dir = is_dir($absoluteTemplateDir) ? $absoluteTemplateDir : $pluginTemplateDir;
}
示例2: init
function init($templateName, $pluginName)
{
parent::init($templateName);
$this->template_dir = 'templates';
}