| @@ 100-112 (lines=13) @@ | ||
| 97 | return $this->handleView($this->view($comment)); |
|
| 98 | } |
|
| 99 | ||
| 100 | public function cdeleteAction(Request $request): Response |
|
| 101 | { |
|
| 102 | /** @var int[] $ids */ |
|
| 103 | $ids = array_filter(explode(',', $request->query->get('ids'))); |
|
| 104 | if (0 === count($ids)) { |
|
| 105 | return $this->handleView($this->view(null, 204)); |
|
| 106 | } |
|
| 107 | ||
| 108 | $this->get('sulu_comment.manager')->delete($ids); |
|
| 109 | $this->get('doctrine.orm.entity_manager')->flush(); |
|
| 110 | ||
| 111 | return $this->handleView($this->view(null, 204)); |
|
| 112 | } |
|
| 113 | ||
| 114 | public function deleteAction(int $id): Response |
|
| 115 | { |
|
| @@ 90-102 (lines=13) @@ | ||
| 87 | return $this->handleView($this->view($thread)); |
|
| 88 | } |
|
| 89 | ||
| 90 | public function cdeleteAction(Request $request): Response |
|
| 91 | { |
|
| 92 | /** @var int[] $ids */ |
|
| 93 | $ids = array_filter(explode(',', $request->query->get('ids'))); |
|
| 94 | if (0 === count($ids)) { |
|
| 95 | return $this->handleView($this->view(null, 204)); |
|
| 96 | } |
|
| 97 | ||
| 98 | $this->get('sulu_comment.manager')->deleteThreads($ids); |
|
| 99 | $this->get('doctrine.orm.entity_manager')->flush(); |
|
| 100 | ||
| 101 | return $this->handleView($this->view(null, 204)); |
|
| 102 | } |
|
| 103 | ||
| 104 | public function deleteAction(int $id): Response |
|
| 105 | { |
|