Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public function indexAction(int $examID): string |
||
23 | { |
||
24 | $list = new ExamsListModel($this->get('dbh')); |
||
25 | $examsList = $list->getExamsByGroupId($examID); |
||
26 | |||
27 | $one = new ExamsGroupModel($this->get('dbh')); |
||
28 | $info = $one->getExamsGroupInfoById($examID); |
||
29 | |||
30 | if (null === $info) { |
||
31 | throw new RuntimeException('Exams group does not exist!'); |
||
32 | } |
||
33 | |||
34 | return $this->render('front/list', ['title' => $info->title, 'examsList' => $examsList]); |
||
35 | } |
||
36 | } |
||
37 |