コード例 #1
0
 /**
  * Get list of subordinate employee Ids as an array on integers
  * 
  * @return type Comma separated list or false if no subordinates
  */
 private function _getSubordinateIds($supervisorId)
 {
     $employeeService = new EmployeeService();
     $employeeService->setEmployeeDao(new EmployeeDao());
     $subordinatesList = $employeeService->getSubordinateList($supervisorId, true);
     $ids = array();
     foreach ($subordinatesList as $employee) {
         $ids[] = intval($employee->getEmpNumber());
     }
     return $ids;
 }
コード例 #2
0
 protected function getEmployeeList()
 {
     $employeeService = new EmployeeService();
     $employeeList = array();
     if (Auth::instance()->hasRole(Auth::ADMIN_ROLE)) {
         $properties = array("empNumber", "firstName", "middleName", "lastName", 'termination_id');
         $employeeList = UserRoleManagerFactory::getUserRoleManager()->getAccessibleEntityProperties('Employee', $properties);
     }
     if ($_SESSION['isSupervisor'] && trim(Auth::instance()->getEmployeeNumber()) != "") {
         $employeeList = $employeeService->getSubordinateList(Auth::instance()->getEmployeeNumber());
     }
     return $employeeList;
 }
コード例 #3
0
ファイル: LeaveSummaryForm.php プロジェクト: THM068/orangehrm
 private function _getSubordinatesList()
 {
     if (!empty($this->subordinatesList)) {
         return $this->subordinatesList;
     } else {
         $employeeService = new EmployeeService();
         $employeeService->setEmployeeDao(new EmployeeDao());
         $this->subordinatesList = $employeeService->getSubordinateList($this->loggedUserId, true);
         return $this->subordinatesList;
     }
 }