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