| @@ 345-356 (lines=12) @@ | ||
| 342 | * |
|
| 343 | * @param Circle $circle |
|
| 344 | */ |
|
| 345 | public function destroy(Circle $circle) { |
|
| 346 | $qb = $this->db->getQueryBuilder(); |
|
| 347 | $qb->delete(self::TABLENAME) |
|
| 348 | ->where( |
|
| 349 | $qb->expr() |
|
| 350 | ->eq( |
|
| 351 | 'id', $qb->createNamedParameter($circle->getId()) |
|
| 352 | ) |
|
| 353 | ); |
|
| 354 | ||
| 355 | $qb->execute(); |
|
| 356 | } |
|
| 357 | ||
| 358 | ||
| 359 | /** |
|
| @@ 256-268 (lines=13) @@ | ||
| 253 | * |
|
| 254 | * @return bool |
|
| 255 | */ |
|
| 256 | public function removeAllFromCircle(Circle $circle) { |
|
| 257 | $qb = $this->db->getQueryBuilder(); |
|
| 258 | $qb->delete(self::TABLENAME) |
|
| 259 | ->where( |
|
| 260 | $qb->expr() |
|
| 261 | ->eq('circle_id', $qb->createNamedParameter($circle->getId())) |
|
| 262 | ); |
|
| 263 | ||
| 264 | $qb->execute(); |
|
| 265 | ||
| 266 | return true; |
|
| 267 | ||
| 268 | } |
|
| 269 | } |
|
| 270 | ||
| 271 | ||