本文整理汇总了PHP中UserHelper::isJoomlaSuperAdmin方法的典型用法代码示例。如果您正苦于以下问题:PHP UserHelper::isJoomlaSuperAdmin方法的具体用法?PHP UserHelper::isJoomlaSuperAdmin怎么用?PHP UserHelper::isJoomlaSuperAdmin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserHelper
的用法示例。
在下文中一共展示了UserHelper::isJoomlaSuperAdmin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($default = array())
{
parent::__construct($default);
// init vars
$this->joomla = JFactory::getApplication();
$this->user = JFactory::getUser();
$this->session = JFactory::getSession();
$this->document = JFactory::getDocument();
$this->dispatcher = JDispatcher::getInstance();
$this->option = YRequest::getCmd('option');
$this->link_base = 'index.php?option=' . $this->option;
$this->controller = $this->getName();
// add super administrator var to user
$this->user->superadmin = UserHelper::isJoomlaSuperAdmin($this->user);
// init additional admin vars
if ($this->joomla->isAdmin()) {
$this->baseurl = 'index.php?option=' . $this->option . '&controller=' . $this->getName();
}
// init additional site vars
if ($this->joomla->isSite()) {
$this->itemid = (int) $GLOBALS['Itemid'];
$this->params = $this->joomla->getParams();
$this->pathway = $this->joomla->getPathway();
}
}