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


PHP Employee::Count方法代码示例

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


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

示例1: getDashboardItemData

 public function getDashboardItemData()
 {
     $data = array();
     $emp = new Employee();
     $data['numberOfEmployees'] = $emp->Count("1 = 1");
     return $data;
 }
开发者ID:riazuddinahmed1,项目名称:icehrm,代码行数:7,代码来源:EmployeesAdminManager.php

示例2: getInitData

 public function getInitData($req)
 {
     $data = array();
     $employees = new Employee();
     $data['numberOfEmployees'] = $employees->Count("1 = 1");
     $company = new CompanyStructure();
     $data['numberOfCompanyStuctures'] = $company->Count("1 = 1");
     $user = new User();
     $data['numberOfUsers'] = $user->Count("1 = 1");
     $project = new Project();
     $data['numberOfProjects'] = $project->Count("status = 'Active'");
     $attendance = new Attendance();
     $data['numberOfAttendanceLastWeek'] = $attendance->Count("in_time > '" . date("Y-m-d H:i:s", strtotime("-1 week")) . "'");
     if (empty($data['numberOfAttendanceLastWeek'])) {
         $data['numberOfAttendanceLastWeek'] = 0;
     }
     $empLeave = new EmployeeLeave();
     $data['numberOfLeaves'] = $empLeave->Count("date_start > '" . date("Y-m-d") . "'");
     $timeEntry = new EmployeeTimeEntry();
     $data['numberOfAttendanceLastWeek'] = $timeEntry->Count("in_time > '" . date("Y-m-d H:i:s", strtotime("-1 week")) . "'");
     $candidate = new Candidate();
     $data['numberOfCandidates'] = $candidate->Count("1 = 1");
     $job = new Job();
     $data['numberOfJobs'] = $job->Count("status = 'Active'");
     $course = new Course();
     $data['numberOfCourses'] = $course->Count("1 = 1");
     return new IceResponse(IceResponse::SUCCESS, $data);
 }
开发者ID:riazuddinahmed1,项目名称:icehrm,代码行数:28,代码来源:DashboardActionManager.php

示例3: deleteProfileImage

 public function deleteProfileImage($req)
 {
     $profileId = $this->getCurrentProfileId();
     $subordinate = new Employee();
     $subordinatesCount = $subordinate->Count("supervisor = ? and id = ?", array($profileId, $req->id));
     if ($this->user->user_level == 'Admin' || $this->user->employee == $req->id || $subordinatesCount == 1) {
         $fs = FileService::getInstance();
         $res = $fs->deleteProfileImage($req->id);
         return new IceResponse(IceResponse::SUCCESS, $res);
     }
     return new IceResponse(IceResponse::ERROR, "Not allowed to delete profile image");
 }
开发者ID:ahmedalaahagag,项目名称:ICEPROHRM,代码行数:12,代码来源:EmployeesActionManager.php

示例4: getInitData

 public function getInitData($req)
 {
     $data = array();
     $emp = new Employee();
     $data['numberOfEmployees'] = $emp->Count("status = 'Active' and supervisor = ?", array($this->getCurrentProfileId()));
     $data['lastTimeSheetHours'] = $this->getLastTimeSheetHours($req)->getData();
     $data['activeProjects'] = $this->getEmployeeActiveProjects($req)->getData();
     $data['pendingLeaves'] = $this->getPendingLeaves($req)->getData();
     $candidate = new Candidate();
     $data['numberOfCandidates'] = $candidate->Count("1 = 1");
     $job = new Job();
     $data['numberOfJobs'] = $job->Count("status = 'Active'");
     $attendance = new Attendance();
     $data['numberOfAttendanceLastWeek'] = $attendance->Count("in_time > '" . date("Y-m-d H:i:s", strtotime("-1 week")) . "'");
     $course = new Course();
     $data['numberOfCourses'] = $course->Count("1 = 1");
     return new IceResponse(IceResponse::SUCCESS, $data);
 }
开发者ID:riazuddinahmed1,项目名称:icehrm,代码行数:18,代码来源:DashboardActionManager.php


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