| @@ 22-34 (lines=13) @@ | ||
| 19 | * |
|
| 20 | * @return void |
|
| 21 | */ |
|
| 22 | public function getPostCreateComment($id) |
|
| 23 | { |
|
| 24 | $question = new Question($this->di->get("db")); |
|
| 25 | ||
| 26 | $views = [ |
|
| 27 | ["comment/question/view-all", ["questions" => $question->getQuestions()], "main"] |
|
| 28 | ]; |
|
| 29 | ||
| 30 | $this->di->get("pageRenderComment")->renderPage([ |
|
| 31 | "views" => $views, |
|
| 32 | "title" => "All questions" |
|
| 33 | ]); |
|
| 34 | } |
|
| 35 | } |
|
| 36 | ||
| @@ 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 |
|
| @@ 91-103 (lines=13) @@ | ||
| 88 | * |
|
| 89 | * @return void |
|
| 90 | */ |
|
| 91 | public function getTaggedQuestions($tag) |
|
| 92 | { |
|
| 93 | $comment = new Comment($this->di->get("db")); |
|
| 94 | ||
| 95 | $views = [ |
|
| 96 | ["comment/crud/view-all", ["questions" => $comment->getPosts("tags LIKE ?", [$tag])], "main"] |
|
| 97 | ]; |
|
| 98 | ||
| 99 | $this->di->get("pageRenderComment")->renderPage([ |
|
| 100 | "views" => $views, |
|
| 101 | "title" => "Questions | $tag" |
|
| 102 | ]); |
|
| 103 | } |
|
| 104 | ||
| 105 | /** |
|
| 106 | * View all comments and create question form |
|