| @@ 217-229 (lines=13) @@ | ||
| 214 | * |
|
| 215 | * @return bool |
|
| 216 | */ |
|
| 217 | public function removeAllFromCircle(Circle $circle) { |
|
| 218 | $qb = $this->db->getQueryBuilder(); |
|
| 219 | $qb->delete(self::TABLENAME) |
|
| 220 | ->where( |
|
| 221 | $qb->expr() |
|
| 222 | ->eq('circle_id', $qb->createNamedParameter($circle->getId())) |
|
| 223 | ); |
|
| 224 | ||
| 225 | $qb->execute(); |
|
| 226 | ||
| 227 | return true; |
|
| 228 | ||
| 229 | } |
|
| 230 | } |
|
| 231 | ||
| 232 | ||
| @@ 341-352 (lines=12) @@ | ||
| 338 | * |
|
| 339 | * @param Circle $circle |
|
| 340 | */ |
|
| 341 | public function destroy(Circle $circle) { |
|
| 342 | $qb = $this->db->getQueryBuilder(); |
|
| 343 | $qb->delete(self::TABLENAME) |
|
| 344 | ->where( |
|
| 345 | $qb->expr() |
|
| 346 | ->eq( |
|
| 347 | 'id', $qb->createNamedParameter($circle->getId()) |
|
| 348 | ) |
|
| 349 | ); |
|
| 350 | ||
| 351 | $qb->execute(); |
|
| 352 | } |
|
| 353 | ||
| 354 | ||
| 355 | /** |
|