| @@ 108-122 (lines=15) @@ | ||
| 105 | * @param Institution $raInstitution |
|
| 106 | * @return void |
|
| 107 | */ |
|
| 108 | public function removeByRaInstitution(Institution $raInstitution) |
|
| 109 | { |
|
| 110 | $raCandidates = $this->findByRaInstitution($raInstitution); |
|
| 111 | ||
| 112 | if (empty($raCandidates)) { |
|
| 113 | return; |
|
| 114 | } |
|
| 115 | ||
| 116 | $em = $this->getEntityManager(); |
|
| 117 | foreach ($raCandidates as $raCandidate) { |
|
| 118 | $em->remove($raCandidate); |
|
| 119 | } |
|
| 120 | ||
| 121 | $em->flush(); |
|
| 122 | } |
|
| 123 | ||
| 124 | /** |
|
| 125 | * @param IdentityId $identityId |
|
| @@ 129-143 (lines=15) @@ | ||
| 126 | * @param Institution $raInstitution |
|
| 127 | * @return void |
|
| 128 | */ |
|
| 129 | public function removeByIdentityIdAndRaInstitution(IdentityId $identityId, Institution $raInstitution) |
|
| 130 | { |
|
| 131 | $raCandidates = $this->findByIdentityIdAndRaInstitution($identityId, $raInstitution); |
|
| 132 | ||
| 133 | if (empty($raCandidates)) { |
|
| 134 | return; |
|
| 135 | } |
|
| 136 | ||
| 137 | $em = $this->getEntityManager(); |
|
| 138 | foreach ($raCandidates as $raCandidate) { |
|
| 139 | $em->remove($raCandidate); |
|
| 140 | } |
|
| 141 | ||
| 142 | $em->flush(); |
|
| 143 | } |
|
| 144 | ||
| 145 | /** |
|
| 146 | * @param string[] $nameIds |
|