| @@ 361-372 (lines=12) @@ | ||
| 358 | * |
|
| 359 | * @param Circle $circle |
|
| 360 | */ |
|
| 361 | public function destroy(Circle $circle) { |
|
| 362 | $qb = $this->db->getQueryBuilder(); |
|
| 363 | $qb->delete(self::TABLENAME) |
|
| 364 | ->where( |
|
| 365 | $qb->expr() |
|
| 366 | ->eq( |
|
| 367 | 'id', $qb->createNamedParameter($circle->getId()) |
|
| 368 | ) |
|
| 369 | ); |
|
| 370 | ||
| 371 | $qb->execute(); |
|
| 372 | } |
|
| 373 | ||
| 374 | ||
| 375 | /** |
|
| @@ 253-265 (lines=13) @@ | ||
| 250 | * |
|
| 251 | * @return bool |
|
| 252 | */ |
|
| 253 | public function removeAllFromCircle(Circle $circle) { |
|
| 254 | $qb = $this->db->getQueryBuilder(); |
|
| 255 | $qb->delete(self::TABLENAME) |
|
| 256 | ->where( |
|
| 257 | $qb->expr() |
|
| 258 | ->eq('circle_id', $qb->createNamedParameter($circle->getId())) |
|
| 259 | ); |
|
| 260 | ||
| 261 | $qb->execute(); |
|
| 262 | ||
| 263 | return true; |
|
| 264 | ||
| 265 | } |
|
| 266 | } |
|
| 267 | ||
| 268 | ||