Add getCaseWorkers method

This commit is contained in:
Ryan Prather 2024-12-07 22:51:42 -05:00
parent 4c9f9ca203
commit 2c623fd902

View File

@ -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 // * @return User[] Returns an array of User objects
// */ // */