本文整理匯總了PHP中Default_Model_Employee::getAllEmployeesData方法的典型用法代碼示例。如果您正苦於以下問題:PHP Default_Model_Employee::getAllEmployeesData方法的具體用法?PHP Default_Model_Employee::getAllEmployeesData怎麽用?PHP Default_Model_Employee::getAllEmployeesData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Default_Model_Employee
的用法示例。
在下文中一共展示了Default_Model_Employee::getAllEmployeesData方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getAllEmployeesGrid
/**
*
* @param type $sort
* @param type $by
* @param type $perPage
* @param type $pageNo
* @param type $searchData
* @param type $call
* @param type $dashboardcall
* @param type $exParam1
* @param type $exParam2
* @param type $exParam3
* @param type $exParam4
* @return type
*/
public function getAllEmployeesGrid($sort, $by, $perPage, $pageNo, $searchData, $call, $dashboardcall, $exParam1 = '', $exParam2 = '', $exParam3 = '', $exParam4 = '')
{
$searchQuery = '';
$tablecontent = '';
$searchArray = array();
$data = array();
$id = '';
$dataTmp = array();
if ($searchData != '' && $searchData != 'undefined') {
$searchValues = json_decode($searchData);
foreach ($searchValues as $key => $val) {
if ($key == "userfullname") {
$searchQuery .= " e." . $key . " like '%" . $val . "%' AND ";
} else {
if ($key == "rm") {
$searchQuery .= " e.userfullname like '%" . $val . "%' AND ";
} else {
if ($key == "jobtitle_name") {
$searchQuery .= " e.jobtitle_name like '%" . $val . "%' AND ";
} else {
if ($key == 'extn') {
$searchQuery .= " concat(e.office_number,' (ext ',e.extension_number,')') like '%" . $val . "%' AND ";
} else {
$searchQuery .= " e." . $key . " like '%" . $val . "%' AND ";
}
}
}
}
$searchArray[$key] = $val;
}
$searchQuery = rtrim($searchQuery, " AND");
}
$objName = 'deltateam';
$emptyroles = 0;
$tableFields = array('userfullname' => 'Employee Name', 'jobtitle_name' => 'Designation', 'businessunit_name' => 'Business Unit', 'department_name' => 'Department', 'emailaddress' => 'E-mail', 'extn' => ' Work Phone');
$employeeModel = new Default_Model_Employee();
$tablecontent = $employeeModel->getAllEmployeesData($sort, $by, $pageNo, $perPage, $searchQuery, $exParam1, $exParam1);
if ($tablecontent == "emptyroles") {
$emptyroles = 1;
} else {
$emptyroles = 0;
}
$dataTmp = array('dashboardcall' => $dashboardcall, 'emptyroles' => $emptyroles, 'sort' => $sort, 'by' => $by, 'pageNo' => $pageNo, 'perPage' => $perPage, 'tablecontent' => $tablecontent, 'objectname' => $objName, 'extra' => array(), 'tableheader' => $tableFields, 'jsGridFnName' => 'getAjaxgridData', 'jsFillFnName' => '', 'searchArray' => $searchArray, 'menuName' => 'Delta Team', 'add' => 'add', 'call' => $call, 'sortStr' => $by, 'context' => 'deltateam');
return $dataTmp;
}