本文整理汇总了PHP中XoopsModule::loadAdminMenu方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsModule::loadAdminMenu方法的具体用法?PHP XoopsModule::loadAdminMenu怎么用?PHP XoopsModule::loadAdminMenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XoopsModule
的用法示例。
在下文中一共展示了XoopsModule::loadAdminMenu方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
function __construct(XoopsModule $module)
{
parent::__construct($this);
$this->module = $module;
$module->loadAdminMenu();
$this->adminmenu = $this->module->adminmenu;
foreach ($this->adminmenu as $menu) {
if (stripos($_SERVER['REQUEST_URI'], $menu['link']) !== false) {
$this->title = $menu['title'];
$this->icon = $menu['link'];
$this->icon = $menu['icon'];
}
}
}
示例2: renderNavigation
/**
* Render navigation to admin page
*
* @param string $menu current menu
*
* @return array
*/
public function renderNavigation($menu = '')
{
$xoops = \Xoops::getInstance();
$ret = array();
$this->module->loadAdminMenu();
foreach (array_keys($this->module->adminmenu) as $i) {
if ($this->module->adminmenu[$i]['link'] == "admin/" . $menu) {
if (\XoopsLoad::fileExists($xoops->path("/media/xoops/images/icons/32/" . $this->module->adminmenu[$i]['icon']))) {
$this->module->adminmenu[$i]['icon'] = $xoops->url("/media/xoops/images/icons/32/" . $this->module->adminmenu[$i]['icon']);
} else {
$this->module->adminmenu[$i]['icon'] = $xoops->url("/modules/" . $xoops->module->dirname() . "/icons/32/" . $this->module->adminmenu[$i]['icon']);
}
$xoops->tpl()->assign('xo_sys_navigation', $this->module->adminmenu[$i]);
$ret[] = $xoops->tpl()->fetch($this->getTplPath('nav'));
}
}
return $ret;
}
示例3: array
function __construct(XoopsModule $module)
{
parent::__construct($this);
$this->setTemplate(XMF_ROOT_PATH . '/templates/xmf_adminmenu.html');
$this->module =& $module;
$this->currentoption = -1;
$this->breadcrumb = '';
$this->submenus = false;
$this->currentsub = -1;
$this->headermenu = array();
$this->adminmenu = $module->loadAdminMenu();
foreach ($this->module->adminmenu as $i => $menu) {
if (stripos($_SERVER['REQUEST_URI'], $menu['link']) !== false) {
$this->currentoption = $i;
$this->breadcrumb = $menu['title'];
}
}
}
示例4: addNavigation
/**
* @param string $menu
*
* @return string
*/
public function addNavigation($menu = '')
{
$ret = '';
$navigation = '';
$path = XOOPS_URL . '/modules/' . $this->_obj->getVar('dirname') . '/';
$this->_obj->loadAdminMenu();
foreach (array_keys($this->_obj->adminmenu) as $i) {
if ($this->_obj->adminmenu[$i]['link'] == 'admin/' . $menu) {
$navigation .= $this->_obj->adminmenu[$i]['title'] . ' | ';
$ret = "<div class=\"CPbigTitle\" style=\"background-image: url(" . $path . $this->_obj->adminmenu[$i]['icon'] . "); background-repeat: no-repeat; background-position: left; padding-left: 50px;\">\n <strong>" . $this->_obj->adminmenu[$i]['title'] . '</strong></div><br>';
} else {
$navigation .= "<a href = '../" . $this->_obj->adminmenu[$i]['link'] . "'>" . $this->_obj->adminmenu[$i]['title'] . '</a> | ';
}
}
if (substr(XOOPS_VERSION, 0, 9) < 'XOOPS 2.5') {
$navigation .= "<a href = '../../system/admin.php?fct=preferences&op=showmod&mod=" . $this->_obj->getVar('mid') . "'>" . _MI_SYSTEM_ADMENU6 . '</a>';
$ret = $navigation . '<br><br>' . $ret;
}
return $ret;
}