public function getTimeEntries($req) { $employee = $this->baseService->getElement('Employee', $this->getCurrentProfileId(), null, true); $timeSheetEntry = new EmployeeTimeEntry(); $list = $timeSheetEntry->Find("timesheet = ? order by date_start", array($req->id)); $mappingStr = $req->sm; $map = json_decode($mappingStr); if (!$list) { LogManager::getInstance()->info($timeSheetEntry->ErrorMsg()); } if (!empty($mappingStr)) { $list = $this->baseService->populateMapping($list, $map); } return new IceResponse(IceResponse::SUCCESS, $list); }