本文整理汇总了PHP中commonModel::printModuleMenu方法的典型用法代码示例。如果您正苦于以下问题:PHP commonModel::printModuleMenu方法的具体用法?PHP commonModel::printModuleMenu怎么用?PHP commonModel::printModuleMenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类commonModel
的用法示例。
在下文中一共展示了commonModel::printModuleMenu方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
echo html::a($app->company->website, $lang->company->website, '_blank');
}
if ($app->company->backyard) {
echo html::a($app->company->backyard, $lang->company->backyard, '_blank');
}
?>
</td>
<td class='a-right'><?php
commonModel::printTopBar();
?>
</td>
</tr>
</table>
<table class='cont' id='navbar'>
<tr><td id='mainmenu'><?php
commonModel::printMainmenu($this->moduleName);
commonModel::printSearchBox();
?>
</td></tr>
</table>
</div>
<table class='cont' id='navbar'><tr><td id='modulemenu'><?php
commonModel::printModuleMenu($this->moduleName);
?>
</td></tr></table>
<div id='wrap'>
<?php
}
?>
<div class='outer'>
示例2: printMainAndModulemenu
/**
* Print the main and module menu.
*
* @param string $moduleName
* @static
* @access public
* @return void
*/
public static function printMainAndModulemenu($moduleName, $methodName = '', $defaultTheme)
{
global $app, $lang;
//echo "<ul class='nav'>\n";
echo "<div id='firstpane' class='menu_list'>\n";
/* Set the main main menu. */
$mainMenu = $moduleName;
if (isset($lang->menugroup->{$moduleName})) {
$mainMenu = $lang->menugroup->{$moduleName};
}
if ($app->getViewType() == 'mhtml') {
if ($moduleName == 'my') {
$mainMenu = $methodName;
}
if ($moduleName == 'todo') {
$mainMenu = $moduleName;
}
if ($moduleName == 'story' and !isset($lang->menu->story)) {
$mainMenu = 'product';
}
if ($moduleName == 'bug' and !isset($lang->menu->bug)) {
$mainMenu = 'product';
}
if ($moduleName == 'task' and !isset($lang->menu->task)) {
$mainMenu = 'project';
}
}
/* Sort menu according to menuOrder. */
if (isset($lang->menuOrder)) {
$menus = $lang->menu;
$lang->menu = new stdclass();
ksort($lang->menuOrder, SORT_ASC);
foreach ($lang->menuOrder as $key) {
$menu = $menus->{$key};
unset($menus->{$key});
$lang->menu->{$key} = $menu;
}
foreach ($menus as $key => $menu) {
$lang->menu->{$key} = $menu;
}
}
$activeName = $app->getViewType() == 'mhtml' ? 'ui-btn-active' : 'active';
/* Print all main menus. */
foreach ($lang->menu as $menuKey => $menu) {
$active = $menuKey == $mainMenu ? "class='{$activeName}'" : '';
$link = explode('|', $menu);
list($menuLabel, $module, $method) = $link;
$vars = isset($link[3]) ? $link[3] : '';
if (common::hasPriv($module, $method)) {
// changedbyheng
if ($module == "my" || $module == "product" || $module == "company") {
// if ($module == "product")
// {
// $method = "productplan";
// }
// addedbyheng
$link = helper::createLink($module, $method, $vars);
//echo "<li $active><a href='$link' $active id='menu$menuKey'>$menuLabel</a></li>\n";
// echo "<p class='menu_head current' id='mainMenuTitle'><a href='$link' $active id='menu$menuKey'>$menuLabel</a></p>\n";
$imgPath = $defaultTheme . "images/main/icon/" . $module . ".png";
echo "<p class='mainTitle{$module}'><img src='{$imgPath}' class='img{$module}'/><a href='{$link}' id='mainMenuTitle{$module}' class='mainMenuCommon'>{$menuLabel}</a></p>\n";
//changedbyheng
if ($module == 'my') {
commonModel::printModuleMenu($module, $defaultTheme);
}
}
// if ($module == "product")
// {
// $method = "productplan";
// }
// $link = helper::createLink($module, $method, $vars);
// echo "<p class='menu_head current'><a href='$link' $active id='menu$menuKey'>$menuLabel</a></p>\n";
// commonModel::printModuleMenu($module);
}
}
//echo "</ul>\n";
echo "</div>\n";
}