pwa setting
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\ClinicInvitation\Repository;
|
||||
|
||||
use App\Doctor\Entity\Doctor;
|
||||
use App\ClinicInvitation\Entity\ClinicDoctorInvitation;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
@@ -32,6 +33,19 @@ class ClinicDoctorInvitationRepository extends ServiceEntityRepository
|
||||
->getOneOrNullResult();
|
||||
}
|
||||
|
||||
/** @return ClinicDoctorInvitation[] */
|
||||
public function findPendingByDoctor(Doctor $doctor): array
|
||||
{
|
||||
return $this->createQueryBuilder('i')
|
||||
->where('i.doctor = :doctor')
|
||||
->andWhere('i.status = :status')
|
||||
->setParameter('doctor', $doctor)
|
||||
->setParameter('status', ClinicDoctorInvitation::STATUS_PENDING)
|
||||
->orderBy('i.invitedAt', 'DESC')
|
||||
->getQuery()
|
||||
->getResult();
|
||||
}
|
||||
|
||||
public function save(ClinicDoctorInvitation $invitation): void
|
||||
{
|
||||
$em = $this->getEntityManager();
|
||||
|
||||
Reference in New Issue
Block a user