本文整理汇总了PHP中Default_Model_Menu::UpdateMenus方法的典型用法代码示例。如果您正苦于以下问题:PHP Default_Model_Menu::UpdateMenus方法的具体用法?PHP Default_Model_Menu::UpdateMenus怎么用?PHP Default_Model_Menu::UpdateMenus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Default_Model_Menu
的用法示例。
在下文中一共展示了Default_Model_Menu::UpdateMenus方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save_helper
public function save_helper($is_active, $menu)
{
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$loginUserId = $auth->getStorage()->read()->id;
}
$date = new Zend_Date();
$menumodel = new Default_Model_Menu();
$menu_childs = $menumodel->getMenusWithChilds($menu);
$resArrString = implode(",", $menu_childs);
if ($resArrString != '') {
$where = " id in (" . $resArrString . ")";
$where_privi = " object in (" . $resArrString . ")";
$querystring_menu = "UPDATE main_menu SET isactive = " . $is_active . " where {$where} ";
$menumodel->UpdateMenus($querystring_menu);
$querystring_menu = "UPDATE main_privileges SET isactive = " . $is_active . " where {$where_privi} ";
$menumodel->UpdateMenus($querystring_menu);
if (defined('PERFORMANCEAPPRAISAL_M') && $menu == PERFORMANCEAPPRAISAL_M) {
$querystring_menu = "UPDATE main_menu SET isactive = " . $is_active . " where id in (" . MYPERFORMANCEAPPRAISAL . "," . MYTEAMPERFORMANCEAPPRAISAL . ") ";
$menumodel->UpdateMenus($querystring_menu);
$querystring_menu = "UPDATE main_privileges SET isactive = " . $is_active . " where object in (" . MYPERFORMANCEAPPRAISAL . "," . MYTEAMPERFORMANCEAPPRAISAL . ") ";
$menumodel->UpdateMenus($querystring_menu);
}
}
}