Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
15 | public function deleteWithChildrenAction($model, $model_id, $comment_id, Request $request) |
||
16 | { |
||
17 | $manager = $this->get('mykees.comment.query.manager'); |
||
18 | $comments = $manager->findCommentsByModelAndId($model, $model_id,true); |
||
19 | $children_ids = $manager->getChildren($comments[$comment_id]); |
||
20 | |||
21 | array_push($children_ids,$comment_id); |
||
22 | |||
23 | $manager->deleteByCommentIds($children_ids); |
||
24 | |||
25 | return $this->redirect($request->headers->get('referer')); |
||
26 | } |
||
27 | |||
42 |