本文整理汇总了PHP中SibdietHelper::addSubmenu方法的典型用法代码示例。如果您正苦于以下问题:PHP SibdietHelper::addSubmenu方法的具体用法?PHP SibdietHelper::addSubmenu怎么用?PHP SibdietHelper::addSubmenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SibdietHelper
的用法示例。
在下文中一共展示了SibdietHelper::addSubmenu方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
* Display the view
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
*/
public function display($tpl = null)
{
if ($this->getLayout() !== 'modal') {
SibdietHelper::addSubmenu('profiles');
}
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->permissions = SibdietHelper::getUserPermissions();
if ($this->getLayout() !== 'modal') {
// Calculate profile refer No.
foreach ($this->items as $item) {
$item->referNo = SibdietHelper::getReferNo($item->id);
}
$this->addToolbar();
$this->sidebar = JHtmlSidebar::render();
}
if (in_array('profiles', $this->permissions) || $this->getLayout() == 'modal') {
parent::display($tpl);
}
}