feat: automatic assignment of matching job profiles when adding license
This commit is contained in:
@@ -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()
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user