mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
send first calendar on ms graph
This commit is contained in:
@@ -12,48 +12,47 @@ declare(strict_types=1);
|
||||
namespace Chill\CalendarBundle\Repository;
|
||||
|
||||
use Chill\CalendarBundle\Entity\Invite;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\Persistence\ObjectRepository;
|
||||
|
||||
/**
|
||||
* @method Invite|null find($id, $lockMode = null, $lockVersion = null)
|
||||
* @method Invite|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method Invite[] findAll()
|
||||
* @method Invite[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||
*/
|
||||
class InviteRepository extends ServiceEntityRepository
|
||||
class InviteRepository implements ObjectRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
private EntityRepository $entityRepository;
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
{
|
||||
parent::__construct($registry, Invite::class);
|
||||
$this->entityRepository = $em->getRepository(Invite::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Invite[] Returns an array of Invite objects
|
||||
// */
|
||||
/*
|
||||
public function findByExampleField($value)
|
||||
public function find($id): ?Invite
|
||||
{
|
||||
return $this->createQueryBuilder('i')
|
||||
->andWhere('i.exampleField = :val')
|
||||
->setParameter('val', $value)
|
||||
->orderBy('i.id', 'ASC')
|
||||
->setMaxResults(10)
|
||||
->getQuery()
|
||||
->getResult()
|
||||
;
|
||||
return $this->entityRepository->find($id);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
public function findOneBySomeField($value): ?Invite
|
||||
{
|
||||
return $this->createQueryBuilder('i')
|
||||
->andWhere('i.exampleField = :val')
|
||||
->setParameter('val', $value)
|
||||
->getQuery()
|
||||
->getOneOrNullResult()
|
||||
;
|
||||
}
|
||||
/**
|
||||
* @return array|Invite[]
|
||||
*/
|
||||
public function findAll(): array
|
||||
{
|
||||
return $this->entityRepository->findAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array|Invite[]
|
||||
*/
|
||||
public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null)
|
||||
{
|
||||
return $this->entityRepository->findBy($criteria, $orderBy, $limit, $offset);
|
||||
}
|
||||
|
||||
public function findOneBy(array $criteria): ?Invite
|
||||
{
|
||||
return $this->entityRepository->findOneBy($criteria);
|
||||
}
|
||||
|
||||
public function getClassName(): string
|
||||
{
|
||||
return Invite::class;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user