当前位置: 首页>>代码示例>>PHP>>正文


PHP DaoFactory::MenuMst方法代码示例

本文整理汇总了PHP中DaoFactory::MenuMst方法的典型用法代码示例。如果您正苦于以下问题:PHP DaoFactory::MenuMst方法的具体用法?PHP DaoFactory::MenuMst怎么用?PHP DaoFactory::MenuMst使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DaoFactory的用法示例。


在下文中一共展示了DaoFactory::MenuMst方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: perform

 /**
  * ロールマスタのデータをJSON形式で返す
  * @access public
  * @return array ロールマスタ
  * @see Admin_ActionClass::perform()
  */
 public function perform()
 {
     // get request params ( search )
     $role_name = $this->af->get('role_name');
     $keyword = $this->af->get('keyword');
     // get request params ( pager )
     $limit = $this->af->get('limit');
     $page = $this->af->get('page');
     $order = $this->af->get('order');
     $column = $this->af->get('column');
     // get session params
     $company_id = $this->session->get('company_id');
     // pager setting
     $start_page = ($page - 1) * $limit + 1;
     $end_page = ($page - 1) * $limit + $limit;
     try {
         $params = array('role_name' => $role_name, 'keyword' => $keyword, 'company_id' => $company_id, 'limit' => $limit, 'page' => $page, 'order' => $order, 'column' => $column, 'start_page' => $start_page, 'end_page' => $end_page);
         // ロールマスタ取得
         $list = DaoFactory::RoleMst()->getRoleMstList($params)->fetchAll();
         foreach ($list as &$role) {
             // ロールIDごとの各マスタ権限を取得する
             $role['ROLE_SUMMARY'] = DaoFactory::MenuMst()->getMstAndD2Count(array('company_id' => $company_id, 'role_id' => $role['ROLE_ID']))->fetchAll();
         }
         // ページ情報を設定
         $pager = array('result_page' => $page, 'result_start_num' => $start_page, 'result_end_num' => $end_page, 'result_all_count' => count($list) ? $list[0]['FOUND_ROWS'] : 0, 'result_get_count' => count($list), 'result_limit' => $limit);
         // output にセット
         $output['totalData'] = array();
         $output['listData'] = $list;
         $output['pagerData'] = $pager;
     } catch (Exception $e) {
         // 致命的なエラーが発生
         return array('500', $e->getMessage());
     }
     return array('json', $output);
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:41,代码来源:Get.php

示例2: preforward

 /**
  * ビューの処理を実行する
  * @access public
  * @see Admin_ViewClass::preforward()
  */
 function preforward()
 {
     // get session params
     $company_id = $this->session->get('company_id');
     // 最上位メニュー params 設定
     $params = array('company_id' => $company_id);
     // 最上位メニューを取得( menu_idで昇順ソートすること。レコード部とバインドできなくなる)
     $topMenuList = DaoFactory::MenuMst()->Select(' company_id = ? and parent_id is null order by menu_id asc ', $params)->fetchAll();
     // smarty にセット
     $this->af->setApp('role_menu', $topMenuList);
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:16,代码来源:Index.php

示例3: preforward

 /**
  * ビューの処理を実行する
  * @access public
  * @see Admin_ViewClass::preforward()
  */
 function preforward()
 {
     // get session params
     $company_id = $this->session->get('company_id');
     // 最上位メニュー params 設定
     $params = array('company_id' => $company_id);
     // 最上位メニューを取得
     $topMenuList = DaoFactory::MenuMst()->Select(' company_id = ? and parent_id is null order by menu_id asc ', $params)->fetchAll();
     // 最上位メニューの子供を取得
     if (!empty($topMenuList)) {
         foreach ($topMenuList as $key => &$topMenu) {
             $params = array('company_id' => $company_id, 'parent_id' => $topMenu['MENU_ID']);
             $topMenu['children'] = DaoFactory::MenuMst()->Select(' company_id = ? and parent_id = ? order by menu_id asc ', $params)->fetchAll();
         }
     }
     // smarty 変数にセット
     $this->af->setApp('role_menu', $topMenuList);
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:23,代码来源:Entry.php

示例4: _setDefault

 public function _setDefault(&$renderer)
 {
     // get session params
     $company_id = $this->session->get('company_id');
     $user_id = $this->session->get('user_id');
     $kengen_flg = $this->session->get('kengen_flg');
     // su?
     if ($kengen_flg == Konst::KENGEN_FLG_SUPER) {
         // get menu mst
         $top_menu = DaoFactory::MenuMst()->Select(' company_id = ? and parent_id is null ORDER BY MENU_ID ', array('company_id' => $company_id))->fetchAll();
         // get menu
         $global_menu = array();
         foreach ($top_menu as $menu) {
             $params = array('company_id' => $company_id, 'parent_id' => $menu['MENU_ID']);
             $child_menu = DaoFactory::MenuMst()->Select(' company_id = ? AND parent_id = ? ORDER BY MENU_ID ', $params)->fetchAll();
             if (!empty($child_menu)) {
                 $global_menu[$menu['MENU_ID']]['child_menu'] = $child_menu;
                 $global_menu[$menu['MENU_ID']]['top_menu_name'] = $menu['MENU_NAME'];
             }
         }
     } else {
         // get user
         $params = array('company_id' => $company_id, 'user_id' => $user_id);
         $user = DaoFactory::UserMst()->Retrieve(' company_id = ? and user_id = ? and del_flg = 0 ', $params);
         $user_role_id = $user['ROLE_ID'];
         // get menu mst
         $top_menu = DaoFactory::MenuMst()->Select(' company_id = ? and parent_id is null ORDER BY MENU_ID ', array('company_id' => $company_id))->fetchAll();
         // get menu
         $global_menu = array();
         foreach ($top_menu as $menu) {
             $params = array('company_id' => $company_id, 'role_id' => $user_role_id, 'parent_id' => $menu['MENU_ID']);
             $child_menu = DaoFactory::MenuRoleD()->getMenuRoleDAtParentIdByRoleIdAndParentId($params)->fetchAll();
             if (!empty($child_menu)) {
                 $global_menu[$menu['MENU_ID']]['child_menu'] = $child_menu;
                 $global_menu[$menu['MENU_ID']]['top_menu_name'] = $menu['MENU_NAME'];
             }
         }
     }
     // Renderer からテンプレートエンジンを取得
     $smarty =& $renderer->getEngine();
     $smarty->assign('global_menu', $global_menu);
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:42,代码来源:ViewClass.php


注:本文中的DaoFactory::MenuMst方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。