本文整理匯總了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();
}
}