| @@ 23-35 (lines=13) @@ | ||
| 20 | * |
|
| 21 | * @return void |
|
| 22 | */ |
|
| 23 | public function getIndex() |
|
| 24 | { |
|
| 25 | $question = new Question($this->di->get("db")); |
|
| 26 | ||
| 27 | $views = [ |
|
| 28 | ["comment/question/view-all", ["questions" => $question->getQuestions()], "main"] |
|
| 29 | ]; |
|
| 30 | ||
| 31 | $this->di->get("pageRenderComment")->renderPage([ |
|
| 32 | "views" => $views, |
|
| 33 | "title" => "All questions" |
|
| 34 | ]); |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * View specific question and create answer form |
|
| @@ 19-32 (lines=14) @@ | ||
| 16 | * |
|
| 17 | * @return void |
|
| 18 | */ |
|
| 19 | public function getAllUsersIndex() |
|
| 20 | { |
|
| 21 | $user = new User($this->di->get("db")); |
|
| 22 | $users = $user->getAllUsers(); |
|
| 23 | ||
| 24 | $views = [ |
|
| 25 | ["comment/users/view-all", ["users" => $users], "main"] |
|
| 26 | ]; |
|
| 27 | ||
| 28 | $this->di->get("pageRenderComment")->renderPage([ |
|
| 29 | "views" => $views, |
|
| 30 | "title" => "Coffee users" |
|
| 31 | ]); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * Create page for all users overview |
|