public function getapproverAction() { $ajaxContext = $this->_helper->getHelper('AjaxContext'); $ajaxContext->addActionContext('getapprover', 'html')->initContext(); $employeemodel = new Default_Model_Employee(); $elementid = $this->_request->getParam('elementid'); $bunitid = $this->_request->getParam('bunitid'); $deptid = $this->_request->getParam('deptid'); $approver_1 = $this->_request->getParam('approver_1'); $approver_2 = $this->_request->getParam('approver_2'); $employeeData = array(); $approvercount = ''; $empstring = ''; if ($elementid == 'approvingauthority') { $approvercount = 1; } else { if ($elementid == 'approver_1') { $approvercount = 2; } else { $approvercount = 3; } } if ($approver_1 != '') { $empstring = $approver_1; } if ($approver_2 != '') { $empstring .= ',' . $approver_2; } $employeeData = $employeemodel->getApproverForServiceDesk($bunitid, $deptid, $empstring); $this->view->employeedata = $employeeData; $this->view->approvercount = $approvercount; }