本文整理汇总了PHP中Default_Model_Menu::getMenusDataById方法的典型用法代码示例。如果您正苦于以下问题:PHP Default_Model_Menu::getMenusDataById方法的具体用法?PHP Default_Model_Menu::getMenusDataById怎么用?PHP Default_Model_Menu::getMenusDataById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Default_Model_Menu
的用法示例。
在下文中一共展示了Default_Model_Menu::getMenusDataById方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: viewAction
/**
* @name viewAction
*
* This method is used to display the detail log info
*
* @author Deepthi
* @version 1.0
*/
public function viewAction()
{
$activitylog_model = new Default_Model_Activitylog();
$logmanager_model = new Default_Model_Logmanager();
$menu_model = new Default_Model_Menu();
//Pop up layout
Zend_Layout::getMvcInstance()->setLayoutPath(APPLICATION_PATH . "/layouts/scripts/popup/");
$perPage = PERPAGE;
$this->view->managemodule = 0;
if ($this->getRequest()) {
$id = $this->_request->getParam('id');
$viewLinkArray = array('101', '102');
// menu with view links
$logManagarRecord = $logmanager_model->getLogManagerDataByID($id);
$menuId = $logManagarRecord[0]['menuId'];
$action = $logManagarRecord[0]['user_action'];
switch ($action) {
case 1:
$userAction = 'add';
break;
case 2:
$userAction = 'edit';
break;
default:
$userAction = '';
break;
}
$url = $menu_model->getMenusDataById($menuId);
$modurl = ltrim($url[0]['url'], '/');
if (isset($logManagarRecord[0]['log_details']) && !empty($logManagarRecord[0]['log_details'])) {
$logdetails = '{"testjson":[' . $logManagarRecord[0]['log_details'] . ']}';
$logarr = @get_object_vars(json_decode($logdetails));
if (!empty($logarr)) {
$userArray = array();
$logarr['testjson'] = array_reverse($logarr['testjson']);
$this->logJsonCount = count($logarr['testjson']);
foreach ($logarr['testjson'] as $key => $curr) {
$currArray = @get_object_vars($curr);
$this->modArray[$key]['userid'] = $currArray['userid'];
if ($menuId != '142') {
if (in_array($menuId, $viewLinkArray)) {
$this->modArray[$key]['recordid'] = isset($currArray['recordid']) ? DOMAIN . $modurl . '/view/id/' . $currArray['recordid'] : '0';
} else {
$this->modArray[$key]['recordid'] = isset($currArray['recordid']) ? DOMAIN . $modurl . '/edit/id/' . $currArray['recordid'] : '0';
}
} else {
$this->view->managemodule = 1;
$this->modArray[$key]['recordid'] = $currArray['childrecordid'];
}
$this->modArray[$key]['date'] = $currArray['date'];
if (!in_array($currArray['userid'], $userArray)) {
array_push($userArray, $currArray['userid']);
}
}
$this->userNameArray = $activitylog_model->getuserNamesByIds($userArray);
if ($menuId != '61' && $menuId != '65') {
$this->view->viewrRecordFlag = true;
} else {
$this->view->viewrRecordFlag = false;
}
$this->view->mainArray = $this->modArray;
$this->view->userNameArray = $this->userNameArray;
$this->view->totalJsonCount = $this->logJsonCount;
$this->view->pageNo = 1;
$this->view->perPage = $perPage;
} else {
$this->view->message = "No records found";
exit;
}
}
}
}