本文整理汇总了PHP中EmployeeService::getEmployeePropertyList方法的典型用法代码示例。如果您正苦于以下问题:PHP EmployeeService::getEmployeePropertyList方法的具体用法?PHP EmployeeService::getEmployeePropertyList怎么用?PHP EmployeeService::getEmployeePropertyList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EmployeeService
的用法示例。
在下文中一共展示了EmployeeService::getEmployeePropertyList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getProjectAdminListAsJson
public function getProjectAdminListAsJson()
{
$jsonArray = array();
$employeeService = new EmployeeService();
$employeeService->setEmployeeDao(new EmployeeDao());
$properties = array("empNumber", "firstName", "middleName", "lastName", 'termination_id');
$employeeList = $employeeService->getEmployeePropertyList($properties, 'empNumber', 'ASC');
foreach ($employeeList as $employee) {
$name = trim(trim($employee['firstName'] . ' ' . $employee['middleName'], ' ') . ' ' . $employee['lastName']);
if ($employee['termination_id']) {
$name = $name . ' (' . __('Past Employee') . ')';
}
$jsonArray[] = array('name' => $name, 'id' => $employee['empNumber']);
}
$jsonString = json_encode($jsonArray);
return $jsonString;
}
示例2: getEmployeeListAsJson
public function getEmployeeListAsJson()
{
$jsonArray = array();
$employeeService = new EmployeeService();
$employeeService->setEmployeeDao(new EmployeeDao());
$employeeService instanceof EmployeeService;
$employeeList = $employeeService->getEmployeePropertyList(array('empNumber', 'firstName', 'lastName', 'middleName', 'termination_id'), 'lastName', 'ASC');
$terminationLabel = ' (' . __('Past Employee') . ')';
$jsonArray[] = array('name' => __('All'), 'id' => '');
foreach ($employeeList as $employee) {
$name = $employee['firstName'] . " " . $employee['middleName'];
$name = trim(trim($name) . " " . $employee['lastName']);
if ($employee['termination_id']) {
$name .= $terminationLabel;
}
$jsonArray[] = array('name' => $name, 'id' => $employee['empNumber']);
}
$jsonString = json_encode($jsonArray);
return $jsonString;
}
示例3: getHiringManagerListAsJson
/**
*
* @return <type>
*/
public function getHiringManagerListAsJson()
{
$jsonArray = array();
$employeeService = new EmployeeService();
$employeeService->setEmployeeDao(new EmployeeDao());
$properties = array("empNumber", "firstName", "middleName", "lastName", "termination_id");
$employeeList = $employeeService->getEmployeePropertyList($properties, 'lastName', 'ASC', true);
foreach ($employeeList as $employee) {
$empNumber = $employee['empNumber'];
$name = trim(trim($employee['firstName'] . ' ' . $employee['middleName'], ' ') . ' ' . $employee['lastName']);
$jsonArray[] = array('name' => $name, 'id' => $empNumber);
}
$jsonString = json_encode($jsonArray);
return $jsonString;
}
示例4: getEmployeeList
public function getEmployeeList($trackId)
{
$empNameList = array();
$existReviewersList = $this->getReviwerIdList($trackId);
$employeeService = new EmployeeService();
$employeeService->setEmployeeDao(new EmployeeDao());
$properties = array("empNumber", "firstName", "middleName", "lastName");
$employeeList = $employeeService->getEmployeePropertyList($properties, 'lastName', 'ASC', true);
foreach ($employeeList as $employee) {
$empNumber = $employee['empNumber'];
if (!in_array($empNumber, $existReviewersList)) {
$name = trim(trim($employee['firstName'] . ' ' . $employee['middleName'], ' ') . ' ' . $employee['lastName']);
$empNameList[$empNumber] = $name;
}
}
$this->employeeList = $empNameList;
return $empNameList;
}