findOneBy(['doctor' => $doctor]); } /** @param Doctor[] $doctors @return WeeklySchedule[] */ public function findByDoctors(array $doctors): array { if (empty($doctors)) { return []; } return $this->createQueryBuilder('ws') ->where('ws.doctor IN (:doctors)') ->setParameter('doctors', $doctors) ->getQuery() ->getResult(); } public function findByUuid(string $uuid): ?WeeklySchedule { return $this->findOneBy(['uuid' => $uuid]); } public function save(WeeklySchedule $entity, bool $flush = true): void { $this->getEntityManager()->persist($entity); if ($flush) $this->getEntityManager()->flush(); } public function remove(WeeklySchedule $entity, bool $flush = true): void { $this->getEntityManager()->remove($entity); if ($flush) $this->getEntityManager()->flush(); } }