/** * @param Request $Request * @return mixed */ public function renderAthletes(Request $Request) { $year = $Request->get('season'); if (!$year) { $CurrentSeason = new CurrentSeason(); $year = $CurrentSeason->getEndYear(); } $Season = new Season($year); return $this->App['twig']->render('Track/athletes.twig', array('selectedSeason' => $year, 'firstSeason' => $this->MeetService->getFirstSeasonYear(), 'currentSeason' => $this->App['service.currentSeason']->getEndYear(), 'athletes' => $this->MeetService->getAthletesBySeason($Season))); }
/** * @param $meetId * @return array */ private function getPageData($meetId) { $Season = $this->MeetService->getSeasonByMeetId($meetId); return array('meetId' => $meetId, 'meetDetails' => $this->MeetService->getMeetDetails($meetId), 'athletes' => $this->MeetService->getAthletesBySeason($Season), 'events' => $this->MeetService->getEventTypes(), 'meetResults' => $this->MeetService->getMeetResults($meetId)); }