diff --git a/src/BackendBundle/Repository/NotificationRepository.php b/src/BackendBundle/Repository/NotificationRepository.php index 379f08bd6a78d690f97fe7ddbb46ba26d1dca5af..10772a8a85a6d743cd1be18fa0e24bb3c28e7b5b 100644 --- a/src/BackendBundle/Repository/NotificationRepository.php +++ b/src/BackendBundle/Repository/NotificationRepository.php @@ -33,4 +33,15 @@ class NotificationRepository extends EntityRepository return $this->createQueryBuilder('n') ->select('n'); } + + public function deleteElements(array $ids) + { + $qb = $this->createQueryBuilder('l'); + $qb + ->delete() + ->where('l.id IN (:ids)') + ->setParameter('ids', $ids); + $qb->getQuery()->execute(); + } + } diff --git a/src/BackendBundle/Repository/PredictionRepository.php b/src/BackendBundle/Repository/PredictionRepository.php index f2913a55fcd88d431e92352e0e83564dc394668a..ab4ccb9062b996660ce6ae7775072852cd5f6748 100644 --- a/src/BackendBundle/Repository/PredictionRepository.php +++ b/src/BackendBundle/Repository/PredictionRepository.php @@ -53,4 +53,15 @@ class PredictionRepository extends EntityRepository return $qb->getQuery()->getResult(); } + + public function deleteElements(array $ids) + { + $qb = $this->createQueryBuilder('l'); + $qb + ->delete() + ->where('l.id IN (:ids)') + ->setParameter('ids', $ids); + $qb->getQuery()->execute(); + } + } diff --git a/src/BackendBundle/Repository/TeamRepository.php b/src/BackendBundle/Repository/TeamRepository.php index 574c0ffc1739b66d48e6565f003c3bb7a3e04b9b..09deca3d9387745a1159043962e1e69c943feacf 100644 --- a/src/BackendBundle/Repository/TeamRepository.php +++ b/src/BackendBundle/Repository/TeamRepository.php @@ -35,4 +35,15 @@ class TeamRepository extends EntityRepository 'name' => $pack->getName() ]) !== null; } + + public function deleteElements(array $ids) + { + $qb = $this->createQueryBuilder('l'); + $qb + ->delete() + ->where('l.id IN (:ids)') + ->setParameter('ids', $ids); + $qb->getQuery()->execute(); + } + } \ No newline at end of file