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


PHP Default_Model_Menu::getMenusListForActivitylog方法代码示例

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


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

示例1: getGrid

 /**
  * This function gives all content for grid view.
  * @parameters
  * @param $sort          = ascending or descending
  * @param $by            = name of field which to be sort
  * @param $pageNo        = page number
  * @param $perPage       = no.of records per page
  * @param $searchData    = search string
  * @param $call          = type of call like ajax.
  * @return  Array;
  */
 public function getGrid($sort, $by, $perPage, $pageNo, $searchData, $call, $p1, $p2, $p3, $p4, $p5)
 {
     $menu_model = new Default_Model_Menu();
     $user_model = new Default_Model_Users();
     $searchQuery = '';
     $searchArray = array();
     $data = array();
     if ($searchData != '' && $searchData != 'undefined') {
         $searchValues = json_decode($searchData);
         if (count($searchValues) > 0) {
             foreach ($searchValues as $key => $val) {
                 if ($key == 'last_modifieddate') {
                     $searchQuery .= " " . $key . " like '%" . sapp_Global::getGMTformatdate(urldecode($val)) . "%' AND ";
                 } else {
                     $searchQuery .= " " . $key . " like '%" . $val . "%' AND ";
                 }
                 $searchArray[$key] = $val;
             }
             $searchQuery = rtrim($searchQuery, " AND");
         }
     }
     $objName = 'logmanager';
     $tableFields = array('action' => 'Action', 'menuName' => 'Menu Name', 'id' => 'ID', 'userfullname' => 'Last Modified By', 'profileimg' => 'Profile', 'employeeId' => 'Employee ID', 'menuUrl' => 'Url', 'user_action' => 'Action', 'key_flag' => 'Last Modified Record', 'last_modifieddate' => 'Last Modified Date');
     $tablecontent = $this->getActivitylogData($sort, $by, $pageNo, $perPage, $searchQuery);
     $menu_data = $menu_model->getMenusListForActivitylog();
     $menu_arr = array();
     foreach ($menu_data as $gkey => $gdata) {
         $menu_arr[$gdata['menuname']] = $gdata['menuname'];
     }
     $user_data = $user_model->getUserListForActivitylog();
     $user_arr = array();
     foreach ($user_data as $gkey => $gdata) {
         $user_arr[$gdata['userfullname']] = $gdata['userfullname'];
     }
     $useractionArray = array('1' => 'Add', '5' => 'Cancel', '3' => 'Delete', '2' => 'Edit');
     $dataTmp = array('sort' => $sort, 'by' => $by, 'pageNo' => $pageNo, 'perPage' => $perPage, 'tablecontent' => $tablecontent, 'objectname' => $objName, 'menuName' => 'Activity log', 'extra' => array(), 'tableheader' => $tableFields, 'jsGridFnName' => 'getAjaxgridData', 'jsFillFnName' => '', 'searchArray' => $searchArray, 'call' => $call, 'search_filters' => array('menuname' => array('type' => 'select', 'filter_data' => array('' => 'All') + $menu_arr), 'userfullname' => array('type' => 'select', 'filter_data' => array('' => 'All') + $user_arr), 'last_modifieddate' => array('type' => 'datepicker'), 'user_action' => array('type' => 'select', 'filter_data' => array('' => 'All') + $useractionArray)));
     return $dataTmp;
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:49,代码来源:Activitylog.php


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