| @@ 360-371 (lines=12) @@ | ||
| 357 | * |
|
| 358 | * @param Circle $circle |
|
| 359 | */ |
|
| 360 | public function destroy(Circle $circle) { |
|
| 361 | $qb = $this->db->getQueryBuilder(); |
|
| 362 | $qb->delete(self::TABLENAME) |
|
| 363 | ->where( |
|
| 364 | $qb->expr() |
|
| 365 | ->eq( |
|
| 366 | 'id', $qb->createNamedParameter($circle->getId()) |
|
| 367 | ) |
|
| 368 | ); |
|
| 369 | ||
| 370 | $qb->execute(); |
|
| 371 | } |
|
| 372 | ||
| 373 | ||
| 374 | /** |
|
| @@ 273-285 (lines=13) @@ | ||
| 270 | * |
|
| 271 | * @return bool |
|
| 272 | */ |
|
| 273 | public function removeAllFromCircle(Circle $circle) { |
|
| 274 | $qb = $this->db->getQueryBuilder(); |
|
| 275 | $qb->delete(self::TABLENAME) |
|
| 276 | ->where( |
|
| 277 | $qb->expr() |
|
| 278 | ->eq('circle_id', $qb->createNamedParameter($circle->getId())) |
|
| 279 | ); |
|
| 280 | ||
| 281 | $qb->execute(); |
|
| 282 | ||
| 283 | return true; |
|
| 284 | ||
| 285 | } |
|
| 286 | } |
|
| 287 | ||
| 288 | ||