本文整理汇总了PHP中JView::setLayout方法的典型用法代码示例。如果您正苦于以下问题:PHP JView::setLayout方法的具体用法?PHP JView::setLayout怎么用?PHP JView::setLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JView
的用法示例。
在下文中一共展示了JView::setLayout方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testSetLayout
/**
* Test JView::setLayout()
*
* @since 11.3
*/
public function testSetLayout()
{
$this->assertAttributeEquals('default', '_layout', $this->class);
$this->class->setLayout('test');
$this->assertAttributeEquals('test', '_layout', $this->class);
$this->assertAttributeEquals('_', '_layoutTemplate', $this->class);
$this->class->setLayout('-:test2');
$this->assertAttributeEquals('test2', '_layout', $this->class);
$this->assertAttributeEquals('-', '_layoutTemplate', $this->class);
}
示例2: fetchTemplateChiaSe
function fetchTemplateChiaSe($templatePath, $templateName, $data = null)
{
$template = new JView();
$template->addTemplatePath($templatePath);
if (!empty($data)) {
$template->assignRef('data', $data);
}
$template->setLayout($templateName);
return $template->loadTemplate();
}
示例3: fetchTienIchTemplate
function fetchTienIchTemplate($tienIchIds, $templatePath, $templateName, $listAllFlag = true, $lang)
{
// TODO: remove hard code
// $tienIchIds = '1-1,1-2,2-6';
$data = null;
// $lang = ilandCommonUtils::getLanguage();
// lay tat ca du lieu tien ich
$allList = U_ReModelProperties::layDanhSachTienIch($lang);
$data = U_ReModelProperties::parseTienIch($tienIchIds, $allList, $listAllFlag);
// fetch template tien ich
$template = new JView();
$template->addTemplatePath($templatePath);
$template->assignRef('allFlag', $listAllFlag);
$template->assignRef('tienIchAllList', $data);
$template->setLayout($templateName);
return $template->loadTemplate();
return $data;
}
示例4: showSetup
/**
* TuiyoViewWelcome::showSetup()
*
* @param mixed $user
* @return void
*/
public function showSetup($user = null)
{
$tmpl = $GLOBALS['API']->get("document");
$livestyle = TUIYO_LIVE_PATH . '/client/default/';
//Assign References
$this->assignRef('livestyle', $livestyle);
$this->assignRef('user', $user);
//Terms
$terms = $tmpl->parseTmpl("terms", TUIYO_FILES, array(), "html");
$this->assignRef('terms', $terms);
//Style
$tmpl->addCSS(TUIYO_LIVE_PATH . '/client/default/css/homepage.css');
$tmpl->addJS(TUIYO_LIVE_PATH . '/client/default/script/setup.js');
//Display the view
parent::setLayout('setup');
parent::setLayoutExt('tpl');
parent::display();
}
示例5: setLayout
public function setLayout($layout)
{
parent::setLayout($layout);
return $this;
}