/**
  * @return \HumanResource\Entity\Staff|null
  */
 protected function getCurrentStaff()
 {
     if (!$this->staff) {
         $userId = $this->getAuthUser()->userId;
         $staffDataAccess = new StaffDataAccess($this->getDbAdapter());
         $this->staff = $staffDataAccess->getStaffByUser($userId);
     }
     return $this->staff;
 }
 private function initCombo()
 {
     $staffDA = new StaffDataAccess($this->getDbAdapter());
     $constantDA = new ConstantDataAccess($this->getDbAdapter());
     $this->staffList = $staffDA->getComboData('staffId', 'staffCode');
     $this->statusList = $constantDA->getComboByName('leave_status');
     unset($this->statusList['R']);
     $result = $constantDA->getConstantByName('leave_type');
     $leaveTypes = json_decode($result->getValue());
     if (!$this->leaveTypeList) {
         $comboList = array();
         foreach ($leaveTypes as $leave) {
             $comboList[$leave->id] = $leave->title;
             $this->annualLeave[$leave->id] = $leave->value;
         }
         $this->leaveTypeList = $comboList;
     }
 }
 /**
  * @return array
  */
 private function staffCombo()
 {
     $dataAccess = new StaffDataAccess($this->getDbAdapter());
     return $dataAccess->getComboData('staffId', 'staffCode');
 }