From 2c623fd90297d016ab017daa3880a73230952976 Mon Sep 17 00:00:00 2001 From: Ryan Prather Date: Sat, 7 Dec 2024 22:51:42 -0500 Subject: [PATCH] Add getCaseWorkers method --- src/Repository/UserRepository.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Repository/UserRepository.php b/src/Repository/UserRepository.php index 752422d..f46643c 100644 --- a/src/Repository/UserRepository.php +++ b/src/Repository/UserRepository.php @@ -81,6 +81,19 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader ; } + public function getCaseWorkers(): array + { + return $this->createQueryBuilder('u') + ->orWhere('u.caseWorker = :case_worker') + ->orWhere('u.caseManager = :case_manager') + ->setParameter('case_worker', true) + ->setParameter('case_manager', true) + ->orderBy('u.name', 'ASC') + ->getQuery() + ->getResult() + ; + } + // /** // * @return User[] Returns an array of User objects // */