本文整理汇总了PHP中Kwc_Abstract::getTemplateFile方法的典型用法代码示例。如果您正苦于以下问题:PHP Kwc_Abstract::getTemplateFile方法的具体用法?PHP Kwc_Abstract::getTemplateFile怎么用?PHP Kwc_Abstract::getTemplateFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kwc_Abstract
的用法示例。
在下文中一共展示了Kwc_Abstract::getTemplateFile方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTemplate
public function getTemplate(Kwf_Component_Data $component, $type)
{
$template = Kwc_Abstract::getTemplateFile($component->componentClass, $type);
if (!$template) {
throw new Kwf_Exception("No {$type}-Template found for '{$component->componentClass}'");
}
return $template;
}
示例2: includeTemplate
/**
* Includes Template for current Component
*
* @param string $name Template Name without path and .tpl (e.g. "Mail.html")
* @param string $module
* @param string $model
*/
public function includeTemplate($name = null, $module = null, $model = null)
{
$name = Kwc_Abstract::getTemplateFile($this->view->data->componentClass, $name);
if (!$module) {
$module = $this->view;
}
return $this->partial($name, $module, $model);
}
示例3: getTemplate
public function getTemplate(Kwf_Component_Data $component, $type)
{
if ($type == 'Master') {
if (Kwc_Abstract::hasSetting($component->componentClass, 'masterTemplate')) {
return Kwc_Abstract::getSetting($component->componentClass, 'masterTemplate');
}
}
$template = Kwc_Abstract::getTemplateFile($component->componentClass, $type);
if (!$template) {
throw new Kwf_Exception("No {$type}-Template found for '{$component->componentClass}'");
}
return $template;
}
示例4: getComponentsWithMasterTemplate
public static function getComponentsWithMasterTemplate($component)
{
$ret = array();
$ret[] = array('type' => 'component', 'data' => $component);
while ($component) {
if (Kwc_Abstract::getTemplateFile($component->componentClass, 'Master') || Kwc_Abstract::hasSetting($component->componentClass, 'masterTemplate')) {
$ret[] = array('type' => 'master', 'data' => $component);
}
if (Kwc_Abstract::getFlag($component->componentClass, 'resetMaster')) {
break;
}
$component = $component->parent;
}
return $ret;
}
示例5: getTemplate
public function getTemplate(Kwf_Component_Data $component, $type)
{
if ($type == 'Component') {
$mailType = 'Mail.' . $this->getRenderFormat();
} else {
if ($type == 'Partial') {
$mailType = 'Partial.' . $this->getRenderFormat();
}
}
$template = Kwc_Abstract::getTemplateFile($component->componentClass, $mailType);
if (!$template) {
$template = parent::getTemplate($component, $type);
}
return $template;
}
示例6: getTemplate
public function getTemplate(Kwf_Component_Data $component, $type)
{
if ($type == 'Component') {
$tpl = 'Component.exp';
} else {
if ($type == 'Partial') {
$tpl = 'Partial.exp';
}
}
$template = Kwc_Abstract::getTemplateFile($component->componentClass, $tpl);
if (!$template) {
$template = parent::getTemplate($component, $type);
}
return $template;
}