| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function comments(string $id): void |
||
| 28 | { |
||
| 29 | $content = \Apps\ActiveRecord\Content::find($id); |
||
| 30 | if (!$content) { |
||
| 31 | throw new NotFoundException(__('Content not found')); |
||
| 32 | } |
||
| 33 | |||
| 34 | // build full path |
||
| 35 | $path = '/content/read/' . $content->getPath() . '#comments-list'; |
||
| 36 | |||
| 37 | // redirect to comment. todo: load all comments and scroll to target by id |
||
| 38 | $this->response->redirect($path); |
||
| 39 | } |
||
| 40 | } |