| @@ 159-171 (lines=13) @@ | ||
| 156 | * |
|
| 157 | * @return Response |
|
| 158 | */ |
|
| 159 | public function cdeleteAction(Request $request) |
|
| 160 | { |
|
| 161 | $ids = array_filter(explode(',', $request->get('ids', ''))); |
|
| 162 | ||
| 163 | if (0 === count($ids)) { |
|
| 164 | return $this->handleView($this->view(null, 204)); |
|
| 165 | } |
|
| 166 | ||
| 167 | $this->get('sulu_comment.manager')->delete($ids); |
|
| 168 | $this->get('doctrine.orm.entity_manager')->flush(); |
|
| 169 | ||
| 170 | return $this->handleView($this->view(null, 204)); |
|
| 171 | } |
|
| 172 | ||
| 173 | /** |
|
| 174 | * trigger a action for given comment specified over action get-parameter |
|
| @@ 152-164 (lines=13) @@ | ||
| 149 | * |
|
| 150 | * @return Response |
|
| 151 | */ |
|
| 152 | public function cdeleteAction(Request $request) |
|
| 153 | { |
|
| 154 | $ids = array_filter(explode(',', $request->get('ids', ''))); |
|
| 155 | ||
| 156 | if (0 === count($ids)) { |
|
| 157 | return $this->handleView($this->view(null, 204)); |
|
| 158 | } |
|
| 159 | ||
| 160 | $this->get('sulu_comment.manager')->deleteThreads($ids); |
|
| 161 | $this->get('doctrine.orm.entity_manager')->flush(); |
|
| 162 | ||
| 163 | return $this->handleView($this->view(null, 204)); |
|
| 164 | } |
|
| 165 | ||
| 166 | /** |
|
| 167 | * Returns array of field-descriptors. |
|