1 | <?php |
||
39 | class RaCandidateRepository extends EntityRepository |
||
40 | { |
||
41 | /** |
||
42 | * @var InstitutionAuthorizationRepositoryFilter |
||
43 | */ |
||
44 | private $authorizationRepositoryFilter; |
||
45 | |||
46 | public function __construct( |
||
54 | |||
55 | // /** |
||
56 | // * @param RaCandidate $raCandidate |
||
57 | // * @return void |
||
58 | // */ |
||
59 | // public function merge(RaCandidate $raCandidate) |
||
60 | // { |
||
61 | // $raCandidate = $this->getEntityManager()->merge($raCandidate); |
||
62 | // $this->getEntityManager()->persist($raCandidate); |
||
63 | // $this->getEntityManager()->flush(); |
||
64 | // } |
||
65 | // |
||
66 | // /** |
||
67 | // * @param IdentityId $identityId |
||
68 | // * @return void |
||
69 | // */ |
||
70 | // public function removeByIdentityId(IdentityId $identityId) |
||
71 | // { |
||
72 | // $raCandidates = $this->findByIdentityId($identityId); |
||
73 | // |
||
74 | // if (empty($raCandidates)) { |
||
75 | // return; |
||
76 | // } |
||
77 | // |
||
78 | // foreach ($raCandidates as $candidate) { |
||
79 | // $this->getEntityManager()->remove($candidate); |
||
80 | // } |
||
81 | // $this->getEntityManager()->flush(); |
||
82 | // } |
||
83 | // |
||
84 | // /** |
||
85 | // * @param Institution $institution |
||
86 | // * @param InstitutionCollection $raInstitutions |
||
87 | // * @return void |
||
88 | // */ |
||
89 | // public function removeInstitutionsNotInList(Institution $institution, InstitutionCollection $raInstitutions) |
||
90 | // { |
||
91 | // $raCandidates = $this->createQueryBuilder('rac') |
||
92 | // ->where('rac.raInstitution = :raInstitution') |
||
93 | // ->andWhere('rac.institution NOT IN (:institutions)') |
||
94 | // ->setParameter('raInstitution', $institution) |
||
95 | // ->setParameter('institutions', $raInstitutions->serialize()) |
||
96 | // ->getQuery() |
||
97 | // ->getResult(); |
||
98 | // |
||
99 | // $em = $this->getEntityManager(); |
||
100 | // foreach ($raCandidates as $raCandidate) { |
||
101 | // $em->remove($raCandidate); |
||
102 | // } |
||
103 | // |
||
104 | // $em->flush(); |
||
105 | // } |
||
106 | // |
||
107 | // /** |
||
108 | // * @param Institution $raInstitution |
||
109 | // * @return void |
||
110 | // */ |
||
111 | // public function removeByRaInstitution(Institution $raInstitution) |
||
112 | // { |
||
113 | // $raCandidates = $this->findByRaInstitution($raInstitution); |
||
114 | // |
||
115 | // if (empty($raCandidates)) { |
||
116 | // return; |
||
117 | // } |
||
118 | // |
||
119 | // $em = $this->getEntityManager(); |
||
120 | // foreach ($raCandidates as $raCandidate) { |
||
121 | // $em->remove($raCandidate); |
||
122 | // } |
||
123 | // |
||
124 | // $em->flush(); |
||
125 | // } |
||
126 | // |
||
127 | // /** |
||
128 | // * @param IdentityId $identityId |
||
129 | // * @param Institution $raInstitution |
||
130 | // * @return void |
||
131 | // */ |
||
132 | // public function removeByIdentityIdAndRaInstitution(IdentityId $identityId, Institution $raInstitution) |
||
133 | // { |
||
134 | // $raCandidate = $this->findByIdentityIdAndRaInstitution($identityId, $raInstitution); |
||
135 | // |
||
136 | // if (!$raCandidate) { |
||
137 | // return; |
||
138 | // } |
||
139 | // $em = $this->getEntityManager(); |
||
140 | // $em->remove($raCandidate); |
||
141 | // $em->flush(); |
||
142 | // } |
||
143 | // |
||
144 | // /** |
||
145 | // * @param string[] $nameIds |
||
146 | // * @return void |
||
147 | // */ |
||
148 | // public function removeByNameIds($nameIds) |
||
149 | // { |
||
150 | // $raCandidates = $this->findByNameIds($nameIds); |
||
151 | // |
||
152 | // $em = $this->getEntityManager(); |
||
153 | // foreach ($raCandidates as $raCandidate) { |
||
154 | // $em->remove($raCandidate); |
||
155 | // } |
||
156 | // |
||
157 | // $em->flush(); |
||
158 | // } |
||
159 | |||
160 | /** |
||
161 | * @param RaCandidateQuery $query |
||
162 | * @return \Doctrine\ORM\Query |
||
163 | */ |
||
164 | public function createSearchQuery(RaCandidateQuery $query) |
||
214 | |||
215 | /** |
||
216 | * @param RaCandidateQuery $query |
||
217 | * @return \Doctrine\ORM\Query |
||
218 | */ |
||
219 | public function createOptionsQuery(RaCandidateQuery $query) |
||
237 | |||
238 | /** |
||
239 | * @param string[] $sraaList |
||
240 | * @return RaCandidate[] |
||
241 | */ |
||
242 | public function findByNameIds(array $sraaList) |
||
250 | |||
251 | /** |
||
252 | * @param string $identityId |
||
253 | * @return RaCandidate[] |
||
254 | * @throws \Doctrine\ORM\NonUniqueResultException |
||
255 | */ |
||
256 | public function findByIdentityId($identityId) |
||
264 | |||
265 | /** |
||
266 | * @param string $identityId |
||
267 | * @param Institution $raInstitution |
||
268 | * @return null|RaCandidate |
||
269 | * @throws \Doctrine\ORM\NonUniqueResultException |
||
270 | */ |
||
271 | public function findByIdentityIdAndRaInstitution($identityId, Institution $raInstitution) |
||
281 | |||
282 | /** |
||
283 | * @param string $identityId |
||
284 | * @param InstitutionAuthorizationContextInterface $authorizationContext |
||
285 | * @return RaCandidate[] |
||
286 | */ |
||
287 | public function findAllRaasByIdentityId($identityId, InstitutionAuthorizationContextInterface $authorizationContext) |
||
307 | |||
308 | /** |
||
309 | * @param Institution $raInstitution |
||
310 | * @return ArrayCollection|RaCandidate[] |
||
|
|||
311 | * @throws \Doctrine\ORM\NonUniqueResultException |
||
312 | */ |
||
313 | public function findByRaInstitution(Institution $raInstitution) |
||
321 | } |
||
322 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.