Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
716cf56cb2.url-de-test.ws
/
htdocs
/
src
/
Repository
/
/srv/data/web/vhosts/716cf56cb2.url-de-test.ws/htdocs/src/Repository/IcalRepository.php
<?php namespace App\Repository; use App\Entity\Ical; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Persistence\ManagerRegistry; /** * @extends ServiceEntityRepository<Ical> * * @method Ical|null find($id, $lockMode = null, $lockVersion = null) * @method Ical|null findOneBy(array $criteria, array $orderBy = null) * @method Ical[] findAll() * @method Ical[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) */ class IcalRepository extends ServiceEntityRepository { public function __construct(ManagerRegistry $registry) { parent::__construct($registry, Ical::class); } public function add(Ical $entity, bool $flush = false): void { $this->getEntityManager()->persist($entity); if ($flush) { $this->getEntityManager()->flush(); } } public function remove(Ical $entity, bool $flush = false): void { $this->getEntityManager()->remove($entity); if ($flush) { $this->getEntityManager()->flush(); } } public function icalGenerated($logement): array { return $this->createQueryBuilder('ic') ->andWhere('ic.isGenerated = true') ->andWhere('ic.logement = :logement') ->setParameter('logement', $logement) ->getQuery() ->getResult(); } public function icalsLinksImported($logement): array { return $this->createQueryBuilder('ic') ->andWhere('ic.isGenerated = false') ->andWhere('ic.logement = :logement') ->setParameter('logement', $logement) ->getQuery() ->getResult(); } }