本文整理匯總了PHP中Default_Model_Employee::getIndividualEmpDetails方法的典型用法代碼示例。如果您正苦於以下問題:PHP Default_Model_Employee::getIndividualEmpDetails方法的具體用法?PHP Default_Model_Employee::getIndividualEmpDetails怎麽用?PHP Default_Model_Employee::getIndividualEmpDetails使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Default_Model_Employee
的用法示例。
在下文中一共展示了Default_Model_Employee::getIndividualEmpDetails方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: viewAction
/**
*
* View function is used to populate the data for the particular ID.
*/
public function viewAction()
{
$id = $this->getRequest()->getParam('id');
$callval = $this->getRequest()->getParam('call');
if ($callval == 'ajaxcall') {
$this->_helper->layout->disableLayout();
}
$objName = 'servicedeskconf';
$servicedeskconfform = new Default_Form_servicedeskconf();
$servicedeskconfmodel = new Default_Model_Servicedeskconf();
$servicedeskdepartmentmodel = new Default_Model_Servicedeskdepartment();
$departmentsmodel = new Default_Model_Departments();
$employeemodel = new Default_Model_Employee();
$approvingauthflag = '';
$servicedeskconfform->removeElement("submit");
$elements = $servicedeskconfform->getElements();
try {
if ($id) {
if (is_numeric($id) && $id > 0) {
$data = $servicedeskconfmodel->getServiceDeskConfbyID($id);
if (!empty($data)) {
$data = $data[0];
if ($data['department_id'] != '' && $data['department_id'] != 'NULL') {
$deptdata = $departmentsmodel->getSingleDepartmentData($data['department_id']);
if (sizeof($deptdata) > 0) {
$servicedeskconfform->department_id->addMultiOption($deptdata['id'], utf8_encode($deptdata['deptname']));
}
}
if ($data['service_desk_id'] != '' && $data['service_desk_id'] != 'NULL') {
$serviceDeptData = $servicedeskdepartmentmodel->getServiceDeskDepartmentDatabyID($data['service_desk_id']);
if (sizeof($serviceDeptData) > 0) {
$servicedeskconfform->service_desk_id->addMultiOption($serviceDeptData[0]['id'], utf8_encode($serviceDeptData[0]['service_desk_name']));
}
}
if ($data['request_recievers'] != '' && $data['request_recievers'] != 'NULL') {
$reqrecieverdata = $employeemodel->getEmployeeDetails($data['request_recievers']);
if (sizeof($reqrecieverdata) > 0) {
$servicedeskconfform->request_recievers->setMultiOptions($reqrecieverdata);
}
$req_recievers_arr = explode(',', $data['request_recievers']);
}
if ($data['cc_mail_recievers'] != '' && $data['cc_mail_recievers'] != 'NULL') {
$ccmaildata = $employeemodel->getEmployeeDetails($data['cc_mail_recievers']);
if (sizeof($ccmaildata) > 0) {
$servicedeskconfform->cc_mail_recievers->setMultiOptions($ccmaildata);
}
}
if ($data['approver_1'] != '' && $data['approver_1'] != 'NULL') {
$approver1data = $employeemodel->getIndividualEmpDetails($data['approver_1']);
if (sizeof($approver1data) > 0) {
$servicedeskconfform->approver_1->addMultiOption($approver1data['user_id'], utf8_encode($approver1data['userfullname']));
}
$approvingauthflag = 1;
}
if ($data['approver_2'] != '' && $data['approver_2'] != 'NULL') {
$approver2data = $employeemodel->getIndividualEmpDetails($data['approver_2']);
if (sizeof($approver2data) > 0) {
$servicedeskconfform->approver_2->addMultiOption($approver2data['user_id'], utf8_encode($approver2data['userfullname']));
}
$approvingauthflag = 2;
}
if ($data['approver_3'] != '' && $data['approver_3'] != 'NULL') {
$approver3data = $employeemodel->getIndividualEmpDetails($data['approver_3']);
if (sizeof($approver3data) > 0) {
$servicedeskconfform->approver_3->addMultiOption($approver3data['user_id'], utf8_encode($approver3data['userfullname']));
}
$approvingauthflag = 3;
}
$bunitModel = new Default_Model_Businessunits();
$bunitdata = $bunitModel->fetchAll('isactive=1', 'unitname');
$servicedeskconfform->businessunit_id->addMultiOptions(array('' => 'Select Business unit', '0' => 'No Business Unit'));
foreach ($bunitdata->toArray() as $bdata) {
$servicedeskconfform->businessunit_id->addMultiOption($bdata['id'], $bdata['unitname']);
}
$servicedeskconfform->setDefault('businessunit_id', $data['businessunit_id']);
$servicedeskconfform->setDefault('approvingauthority', $approvingauthflag);
$this->view->approvingauthflag = $approvingauthflag;
$this->view->service_desk_flag = $data['service_desk_flag'];
$this->view->request_recievers_value = $data['request_recievers'];
$this->view->cc_mail_recievers_value = $data['cc_mail_recievers'] != '' ? $data['cc_mail_recievers'] : '';
$servicedeskconfform->populate($data);
if (count($elements) > 0) {
foreach ($elements as $key => $element) {
if ($key != "Cancel" && $key != "Edit" && $key != "Delete" && $key != "Attachments") {
$element->setAttrib("disabled", "disabled");
}
}
}
} else {
$this->view->ermsg = 'norecord';
}
} else {
$this->view->ermsg = 'norecord';
}
} else {
$this->view->ermsg = 'norecord';
//.........這裏部分代碼省略.........