| @@ 282-294 (lines=13) @@ | ||
| 279 | * |
|
| 280 | * @return bool |
|
| 281 | */ |
|
| 282 | public function removeAllFromCircle($circleId) { |
|
| 283 | $qb = $this->db->getQueryBuilder(); |
|
| 284 | $qb->delete(self::TABLENAME) |
|
| 285 | ->where( |
|
| 286 | $qb->expr() |
|
| 287 | ->eq('circle_id', $qb->createNamedParameter($circleId)) |
|
| 288 | ); |
|
| 289 | ||
| 290 | $qb->execute(); |
|
| 291 | ||
| 292 | return true; |
|
| 293 | } |
|
| 294 | ||
| 295 | ||
| 296 | /** |
|
| 297 | * remove all members/owner from a circle |
|
| @@ 303-314 (lines=12) @@ | ||
| 300 | * |
|
| 301 | * @return bool |
|
| 302 | */ |
|
| 303 | public function removeAllFromUserId($userId) { |
|
| 304 | $qb = $this->db->getQueryBuilder(); |
|
| 305 | $qb->delete(self::TABLENAME) |
|
| 306 | ->where( |
|
| 307 | $qb->expr() |
|
| 308 | ->eq('user_id', $qb->createNamedParameter($userId)) |
|
| 309 | ); |
|
| 310 | ||
| 311 | $qb->execute(); |
|
| 312 | ||
| 313 | return true; |
|
| 314 | } |
|
| 315 | } |
|
| 316 | ||
| 317 | ||
| @@ 435-446 (lines=12) @@ | ||
| 432 | * |
|
| 433 | * @internal param Circle $circle |
|
| 434 | */ |
|
| 435 | public function destroy($circleId) { |
|
| 436 | $qb = $this->db->getQueryBuilder(); |
|
| 437 | $qb->delete(self::TABLENAME) |
|
| 438 | ->where( |
|
| 439 | $qb->expr() |
|
| 440 | ->eq( |
|
| 441 | 'id', $qb->createNamedParameter($circleId) |
|
| 442 | ) |
|
| 443 | ); |
|
| 444 | ||
| 445 | $qb->execute(); |
|
| 446 | } |
|
| 447 | ||
| 448 | ||
| 449 | /** |
|