| @@ 49-61 (lines=13) @@ | ||
| 46 | * |
|
| 47 | * @return void |
|
| 48 | */ |
|
| 49 | public function getIndex() |
|
| 50 | { |
|
| 51 | $title = "Inlägg"; |
|
| 52 | ||
| 53 | $text = new ShowAllService($this->di); |
|
| 54 | ||
| 55 | $data = [ |
|
| 56 | "items" => $text->getHTML(), |
|
| 57 | ]; |
|
| 58 | ||
| 59 | $crud = "comm/crud/front"; |
|
| 60 | $this->toRender($title, $crud, $data); |
|
| 61 | } |
|
| 62 | ||
| 63 | ||
| 64 | ||
| @@ 131-144 (lines=14) @@ | ||
| 128 | * |
|
| 129 | * @return void |
|
| 130 | */ |
|
| 131 | public function getPostAdminDeleteItem() |
|
| 132 | { |
|
| 133 | $title = "Ta bort text"; |
|
| 134 | $form = new AdminDeleteCommForm($this->di); |
|
| 135 | ||
| 136 | $form->check(); |
|
| 137 | ||
| 138 | $data = [ |
|
| 139 | "form" => $form->getHTML(), |
|
| 140 | ]; |
|
| 141 | ||
| 142 | $crud = "comm/crud/admindelete"; |
|
| 143 | $this->toRender($title, $crud, $data); |
|
| 144 | } |
|
| 145 | ||
| 146 | ||
| 147 | ||
| @@ 183-194 (lines=12) @@ | ||
| 180 | * |
|
| 181 | * @return void |
|
| 182 | */ |
|
| 183 | public function getPostShow($id) |
|
| 184 | { |
|
| 185 | $title = "Inlägg"; |
|
| 186 | $text = new ShowOneService($this->di, $id); |
|
| 187 | ||
| 188 | $data = [ |
|
| 189 | "items" => $text->getHTML(), |
|
| 190 | ]; |
|
| 191 | ||
| 192 | $crud = "comm/crud/view-one"; |
|
| 193 | $this->toRender($title, $crud, $data); |
|
| 194 | } |
|
| 195 | } |
|
| 196 | ||