| @@ 309-320 (lines=12) @@ | ||
| 306 | * |
|
| 307 | * @param Circle $circle |
|
| 308 | */ |
|
| 309 | public function destroy(Circle $circle) { |
|
| 310 | $qb = $this->db->getQueryBuilder(); |
|
| 311 | $qb->delete(self::TABLENAME) |
|
| 312 | ->where( |
|
| 313 | $qb->expr() |
|
| 314 | ->eq( |
|
| 315 | 'id', $qb->createNamedParameter($circle->getId()) |
|
| 316 | ) |
|
| 317 | ); |
|
| 318 | ||
| 319 | $qb->execute(); |
|
| 320 | } |
|
| 321 | ||
| 322 | } |
|
| 323 | ||
| @@ 211-223 (lines=13) @@ | ||
| 208 | * |
|
| 209 | * @return bool |
|
| 210 | */ |
|
| 211 | public function removeAllFromCircle(Circle $circle) { |
|
| 212 | $qb = $this->db->getQueryBuilder(); |
|
| 213 | $qb->delete(self::TABLENAME) |
|
| 214 | ->where( |
|
| 215 | $qb->expr() |
|
| 216 | ->eq('circle_id', $qb->createNamedParameter($circle->getId())) |
|
| 217 | ); |
|
| 218 | ||
| 219 | $qb->execute(); |
|
| 220 | ||
| 221 | return true; |
|
| 222 | ||
| 223 | } |
|
| 224 | } |
|
| 225 | ||
| 226 | ||