feat: automatic assignment of matching job profiles when adding license

This commit is contained in:
Björn Fromme
2024-07-09 15:09:12 +02:00
parent de5117c200
commit 2ff4b7d007
2 changed files with 33 additions and 0 deletions
+13
View File
@@ -34,4 +34,17 @@ class JobProfileRepository extends ServiceEntityRepository
->getResult()
;
}
public function findByLicenseType(string $licenseType): array
{
$qb = $this->createQueryBuilder('job_profile');
return $qb
->where($qb->expr()->like('job_profile.requiredLicenses', ':licenseType'))
->orderBy('job_profile.name', 'ASC')
->setParameter('licenseType', '%'.$licenseType.'%')
->getQuery()
->getResult()
;
}
}