当前位置: 首页>>代码示例>>PHP>>正文


PHP EmployeeService::setEmployeeDao方法代码示例

本文整理汇总了PHP中EmployeeService::setEmployeeDao方法的典型用法代码示例。如果您正苦于以下问题:PHP EmployeeService::setEmployeeDao方法的具体用法?PHP EmployeeService::setEmployeeDao怎么用?PHP EmployeeService::setEmployeeDao使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EmployeeService的用法示例。


在下文中一共展示了EmployeeService::setEmployeeDao方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testBulkAssignLeaveEntitlements

 public function testBulkAssignLeaveEntitlements()
 {
     $this->fixture = sfConfig::get('sf_plugins_dir') . '/orangehrmLeavePlugin/test/fixtures/LeaveEntitlement.yml';
     TestDataService::populate($this->fixture);
     $dao = new LeaveEntitlementDao();
     $limit = 5000;
     $empList = array();
     $employeeService = new EmployeeService();
     $employeeService->setEmployeeDao(new EmployeeDao());
     for ($i = 0; $i < $limit; $i++) {
         $employee = new Employee();
         $employee->setFirstName($i);
         $employee = $employeeService->saveEmployee($employee);
         array_push($empList, $employee->getEmpNumber());
     }
     $start_time = microtime(true);
     $leaveEntitlement = new LeaveEntitlement();
     $leaveEntitlement->setLeaveTypeId(1);
     $leaveEntitlement->setCreditedDate(date('Y-m-d'));
     $leaveEntitlement->setEntitlementType(LeaveEntitlement::ENTITLEMENT_TYPE_ADD);
     $leaveEntitlement->setDeleted(0);
     $leaveEntitlement->setNoOfDays(2);
     $leaveEntitlement->setFromDate('2012-01-01');
     $leaveEntitlement->setToDate('2012-08-01');
     $result = $dao->bulkAssignLeaveEntitlements($empList, $leaveEntitlement);
     $deference = microtime(true) - $start_time;
     $this->assertEquals(count($empList), $result, "Time Deference - " . $deference);
     echo "Add Entitlement 5000 Time " . $deference;
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:29,代码来源:LeavePerformanceTest.php

示例2: getEmployeeService

 public function getEmployeeService()
 {
     if (is_null($this->employeeService)) {
         $empService = new EmployeeService();
         $empService->setEmployeeDao(new EmployeeDao());
         $this->employeeService = $empService;
     }
     return $this->employeeService;
 }
开发者ID:abdocmd,项目名称:orangehrm-3.0.1,代码行数:9,代码来源:viewLeaveListAction.class.php

示例3: getProjectAdminListAsJson

 public function getProjectAdminListAsJson()
 {
     $jsonArray = array();
     $employeeService = new EmployeeService();
     $employeeService->setEmployeeDao(new EmployeeDao());
     $employeeList = $employeeService->getEmployeeList();
     foreach ($employeeList as $employee) {
         $jsonArray[] = array('name' => $employee->getFullName(), 'id' => $employee->getEmpNumber());
     }
     $jsonString = json_encode($jsonArray);
     return $jsonString;
 }
开发者ID:rabbitdigital,项目名称:HRM,代码行数:12,代码来源:SearchProjectForm.php

示例4: getSupervisorListAsJson

 public function getSupervisorListAsJson()
 {
     $jsonArray = array();
     $employeeService = new EmployeeService();
     $employeeService->setEmployeeDao(new EmployeeDao());
     $employeeList = $employeeService->getSupervisorList();
     foreach ($employeeList as $employee) {
         $name = $employee->getFirstName() . " " . $employee->getMiddleName();
         $name = trim(trim($name) . " " . $employee->getLastName());
         $jsonArray[] = array('name' => $name, 'id' => $employee->getEmpNumber());
     }
     $jsonString = json_encode($jsonArray);
     return $jsonString;
 }
开发者ID:rabbitdigital,项目名称:HRM,代码行数:14,代码来源:EmployeeSearchForm.php

示例5: execute

 public function execute($request)
 {
     $jsonArray = array();
     $employeeService = new EmployeeService();
     $employeeService->setEmployeeDao(new EmployeeDao());
     $employeeList = $employeeService->getSubordinateListForEmployee($request->getGetParameter('id'));
     foreach ($employeeList as $subordinate) {
         $employee = $subordinate->getSubordinate();
         $name = $employee->getFirstName() . " " . $employee->getMiddleName();
         $name = trim(trim($name) . " " . $employee->getLastName());
         $jsonArray[] = array('name' => $name, 'id' => $employee->getEmpNumber());
     }
     $jsonString = json_encode($jsonArray);
     echo $jsonString;
     exit;
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:16,代码来源:getSubordinateListAjaxAction.class.php

示例6: getEmployeeListAsJson

 public function getEmployeeListAsJson($employeeList)
 {
     $jsonArray = array();
     $employeeService = new EmployeeService();
     $employeeService->setEmployeeDao(new EmployeeDao());
     $employeeUnique = array();
     foreach ($employeeList as $employee) {
         if (!isset($employeeUnique[$employee->getEmpNumber()])) {
             $name = $employee->getFullName();
             $employeeUnique[$employee->getEmpNumber()] = $name;
             $jsonArray[] = array('name' => $name, 'id' => $employee->getEmpNumber());
         }
     }
     $jsonString = json_encode($jsonArray);
     return $jsonString;
 }
开发者ID:rabbitdigital,项目名称:HRM,代码行数:16,代码来源:AttendanceRecordSearchForm.php

示例7: 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;
 }
开发者ID:THM068,项目名称:orangehrm,代码行数:17,代码来源:SearchProjectForm.php

示例8: getEmployeeListAsJson

 public function getEmployeeListAsJson()
 {
     $jsonArray = array();
     $employeeService = new EmployeeService();
     $employeeService->setEmployeeDao(new EmployeeDao());
     $employeeList = UserRoleManagerFactory::getUserRoleManager()->getAccessibleEntities('Employee');
     $employeeUnique = array();
     $jsonArray[] = array('name' => __('All'), 'id' => '');
     foreach ($employeeList as $employee) {
         if (!isset($employeeUnique[$employee->getEmpNumber()])) {
             $name = $employee->getFullName();
             $employeeUnique[$employee->getEmpNumber()] = $name;
             $jsonArray[] = array('name' => $name, 'id' => $employee->getEmpNumber());
         }
     }
     $jsonString = json_encode($jsonArray);
     return $jsonString;
 }
开发者ID:THM068,项目名称:orangehrm,代码行数:18,代码来源:AttendanceRecordSearchForm.php

示例9: getEmployeeListAsJson

 public function getEmployeeListAsJson()
 {
     $jsonArray = array();
     $employeeService = new EmployeeService();
     $employeeService->setEmployeeDao(new EmployeeDao());
     $employeeUnique = array();
     foreach ($this->employeeList as $employee) {
         $empNumber = $employee['empNumber'];
         if (!isset($employeeUnique[$empNumber])) {
             $name = trim(trim($employee['firstName'] . ' ' . $employee['middleName'], ' ') . ' ' . $employee['lastName']);
             if ($employee['termination_id']) {
                 $name = $name . ' (' . __('Past Employee') . ')';
             }
             $employeeUnique[$empNumber] = $name;
             $jsonArray[] = array('name' => $name, 'id' => $empNumber);
         }
     }
     $jsonString = json_encode($jsonArray);
     return $jsonString;
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:20,代码来源:viewEmployeeTimesheetForm.php

示例10: 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;
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:20,代码来源:EmployeeDirectorySearchForm.php

示例11: 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;
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:19,代码来源:AddJobVacancyForm.php

示例12: 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;
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:18,代码来源:AddPerformanceTrackerForm.php

示例13: _getSubordinateIds

 /**
  * 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->getSupervisorEmployeeChain($supervisorId, true);
     $ids = array();
     foreach ($subordinatesList as $employee) {
         $ids[] = intval($employee->getEmpNumber());
     }
     return $ids;
 }
开发者ID:rabbitdigital,项目名称:HRM,代码行数:16,代码来源:EmployeeTable.class.php

示例14: _getSubordinatesList

 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;
     }
 }
开发者ID:THM068,项目名称:orangehrm,代码行数:11,代码来源:LeaveSummaryForm.php

示例15: getEmployeeListAsJson

 public function getEmployeeListAsJson()
 {
     $jsonArray = array();
     $employeeService = new EmployeeService();
     $employeeService->setEmployeeDao(new EmployeeDao());
     $employeeList = $employeeService->getEmployeeList('empNumber', 'ASC');
     $employeeUnique = array();
     foreach ($employeeList as $employee) {
         if (!isset($employeeUnique[$employee->getEmpNumber()])) {
             $name = $employee->getFirstName() . " " . $employee->getMiddleName();
             $name = trim(trim($name) . " " . $employee->getLastName());
             $employeeUnique[$employee->getEmpNumber()] = $name;
             $jsonArray[] = array('name' => $name, 'id' => $employee->getEmpNumber());
         }
     }
     $jsonString = json_encode($jsonArray);
     return $jsonString;
 }
开发者ID:rabbitdigital,项目名称:HRM,代码行数:18,代码来源:ProjectForm.php


注:本文中的EmployeeService::setEmployeeDao方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。