本文整理匯總了PHP中Default_Model_Employee::get_Other_Approvers方法的典型用法代碼示例。如果您正苦於以下問題:PHP Default_Model_Employee::get_Other_Approvers方法的具體用法?PHP Default_Model_Employee::get_Other_Approvers怎麽用?PHP Default_Model_Employee::get_Other_Approvers使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Default_Model_Employee
的用法示例。
在下文中一共展示了Default_Model_Employee::get_Other_Approvers方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: viewAction
/**
*
*/
public function viewAction()
{
$request_form = new Default_Form_Servicerequest();
$id = $this->_getParam('id', null);
$grid_type = $this->_getParam('t', null);
$status_value = $this->_getParam('v', null);
$req_msg = "";
try {
if ($id != '' && $grid_type != '') {
$grid_type = sapp_Global::_decrypt($grid_type);
$sd_req_model = new Default_Model_Servicerequests();
$grid_type_arr = $sd_req_model->getGridtypearr();
if (is_numeric($id) && $id > 0 && is_numeric($grid_type) && $grid_type > 0 && array_key_exists($grid_type, $grid_type_arr)) {
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$loginUserId = $auth->getStorage()->read()->id;
$loginuserRole = $auth->getStorage()->read()->emprole;
$loginuserGroup = $auth->getStorage()->read()->group_id;
$login_bu = $auth->getStorage()->read()->businessunit_id;
$login_dept = $auth->getStorage()->read()->department_id;
}
$data = $sd_req_model->getRequestById($id);
if (!empty($data)) {
$approver_level = "view";
if (($grid_type_arr[$grid_type] == 'rept_app' || $grid_type_arr[$grid_type] == 'approver') && $data['status'] == 'To management approve') {
$approver_level = $sd_req_model->getApproverLevel($loginUserId, $id);
}
$canTicketEscalate = $sd_req_model->canTicketEscalate($loginUserId, $id);
$ticketFeedbackRating = $sd_req_model->isFeedbackProvided($id);
$request_Admins = $sd_req_model->getRequestAdmins($id);
$request_history = $sd_req_model->getRequestHistory($id);
$requester_length = 5;
$requester_history = $sd_req_model->getLastRequests($id, $data['raised_by'], $requester_length);
$emp_model = new Default_Model_Employee();
$service_conf_model = new Default_Model_Servicedeskconf();
$raised_by_details = $emp_model->getEmp_from_summary($data['raised_by']);
$other_approvers = $emp_model->get_Other_Approvers();
$app_data = $sd_req_model->getApprovers($data['service_desk_conf_id'], "config");
$app_details = $emp_model->getEmployeeDetails(implode(',', $app_data));
foreach ($app_data as $key => $value) {
$app_names[$key] = $app_details[$value];
}
$conf_data = $service_conf_model->getServiceDeskConfbyID($data['service_desk_conf_id']);
$exec_data = $emp_model->getEmployeeDetails($conf_data[0]['request_recievers']);
$this->view->id = $id;
$this->view->data = $data;
$this->view->grid_type = $grid_type_arr[$grid_type];
$this->view->grid_type_arr = $sd_req_model->getGridtypearr_rev();
$this->view->status_value = $status_value;
$this->view->approver_level = $approver_level;
$this->view->canTicketEscalate = $canTicketEscalate;
$this->view->ticketFeedbackRating = $ticketFeedbackRating;
$this->view->loginUserId = $loginUserId;
$this->view->request_Admins = $request_Admins;
$this->view->request_history = $request_history;
$this->view->requester_history = $requester_history;
$this->view->requester_length = $requester_length;
$this->view->raised_by_details = $raised_by_details;
$this->view->other_approvers = $other_approvers;
$this->view->app_names = $app_names;
$this->view->exec_data = $exec_data;
if ($this->getRequest()->getPost()) {
$trDb = Zend_Db_Table::getDefaultAdapter();
// starting transaction
$trDb->beginTransaction();
try {
$req_id = $this->_getParam('hid_reqid', null);
$hid_status = $this->_getParam('hid_status', null);
$request_action = $this->_getParam('request_action', null);
$request_comments = trim($this->_getParam('request_comments', null));
//email stuff ------------Start
$sEmailData = $sd_req_model->getRequestDataForEmail($id);
$summary_data = $sd_req_model->getDataSummary($id);
$stoEmailAddress2 = $sd_req_model->getEmailAddress($sEmailData['raised_by']);
//mail for requester
$stoEmailAddress4 = $sd_req_model->getEmailAddress($sEmailData['executor_id']);
//mail for executor
$stoEmailAddress3 = constant('ITSUPPORT_0');
//$stoEmailAddress3 = $this->getSupportTeamEmailID($sEmailData['service_desk_conf_id']); //mail for support group
$sMailSubject = sprintf("%s - %s - %s - %s", $sEmailData['ticket_number'], $sEmailData['service_desk_name'], $sEmailData['service_request_name'], $hid_status);
$smessage = "The below service request status has been changed to " . $hid_status;
$this->mail_helper_action($sMailSubject, $smessage, $summary_data, $stoEmailAddress2);
$this->mail_helper_action($sMailSubject, $smessage, $summary_data, $stoEmailAddress3);
$this->mail_helper_action($sMailSubject, $smessage, $summary_data, $stoEmailAddress4);
//email stuff ------------End
switch ($hid_status) {
case "Cancelled":
$save_data = array('status' => 'Cancelled', 'modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
$req_msg['success'] = "Request cancelled successfully.";
//mailto: Requester, Supportgroup
break;
case "Duplicate":
if ($request_action != '' && $request_comments != '') {
$save_data = array('status' => 'Duplicate', 'executor_comments' => trim($request_comments), 'modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
}
$req_msg['success'] = "Request marked as duplicate.";
break;
//.........這裏部分代碼省略.........