| @@ 272-284 (lines=13) @@ | ||
| 269 | * @param $ids |
|
| 270 | * @return mixed |
|
| 271 | */ |
|
| 272 | public function deleteByCommentIds($ids) |
|
| 273 | { |
|
| 274 | $comment_class = $this->classRepository($this->comment_class); |
|
| 275 | ||
| 276 | return $this->repository |
|
| 277 | ->createQueryBuilder('c') |
|
| 278 | ->delete($comment_class,'c') |
|
| 279 | ->where("c.id IN(:ids)") |
|
| 280 | ->setParameter('ids', array_values($ids)) |
|
| 281 | ->getQuery() |
|
| 282 | ->execute() |
|
| 283 | ; |
|
| 284 | } |
|
| 285 | ||
| 286 | ||
| 287 | /** |
|
| @@ 292-304 (lines=13) @@ | ||
| 289 | * @param $id |
|
| 290 | * @return mixed |
|
| 291 | */ |
|
| 292 | public function deleteComment($id) |
|
| 293 | { |
|
| 294 | $comment_class = $this->classRepository($this->comment_class); |
|
| 295 | ||
| 296 | return $this->repository |
|
| 297 | ->createQueryBuilder('c') |
|
| 298 | ->delete($comment_class,'c') |
|
| 299 | ->where("c.id = id") |
|
| 300 | ->setParameter('id', $id) |
|
| 301 | ->getQuery() |
|
| 302 | ->execute() |
|
| 303 | ; |
|
| 304 | } |
|
| 305 | ||
| 306 | ||
| 307 | ||