@@ 121-128 (lines=8) @@ | ||
118 | Location $location, |
|
119 | ContactInformation $contactInformation |
|
120 | ) { |
|
121 | if (!$this->raLocations->containsWithId($raLocationId)) { |
|
122 | throw new DomainException(sprintf( |
|
123 | 'Cannot change RaLocation with RaLocationId "%s" in RaLocations of InstitutionConfiguration "%s":' |
|
124 | . 'it is not present', |
|
125 | $raLocationId, |
|
126 | $this->getAggregateRootId() |
|
127 | )); |
|
128 | } |
|
129 | ||
130 | $raLocation = $this->raLocations->getById($raLocationId); |
|
131 | ||
@@ 158-165 (lines=8) @@ | ||
155 | */ |
|
156 | public function removeRaLocation(RaLocationId $raLocationId) |
|
157 | { |
|
158 | if (!$this->raLocations->containsWithId($raLocationId)) { |
|
159 | throw new DomainException(sprintf( |
|
160 | 'Cannot remove RaLocation with RaLocationId "%s" in RaLocations of InstitutionConfiguration "%s":' |
|
161 | . 'it is not present', |
|
162 | $raLocationId, |
|
163 | $this->getAggregateRootId() |
|
164 | )); |
|
165 | } |
|
166 | ||
167 | $this->apply(new RaLocationRemovedEvent($this->institutionConfigurationId, $raLocationId)); |
|
168 | } |