| @@ 610-622 (lines=13) @@ | ||
| 607 | * Apply the description updated event to the event repository. |
|
| 608 | * @param DescriptionUpdated $descriptionUpdated |
|
| 609 | */ |
|
| 610 | protected function applyDescriptionUpdated( |
|
| 611 | DescriptionUpdated $descriptionUpdated |
|
| 612 | ) { |
|
| 613 | $document = $this->loadDocumentFromRepository($descriptionUpdated); |
|
| 614 | ||
| 615 | $eventLd = $document->getBody(); |
|
| 616 | if (empty($eventLd->description)) { |
|
| 617 | $eventLd->description = new \stdClass(); |
|
| 618 | } |
|
| 619 | $eventLd->description->{'nl'} = $descriptionUpdated->getDescription(); |
|
| 620 | ||
| 621 | $this->repository->save($document->withBody($eventLd)); |
|
| 622 | } |
|
| 623 | ||
| 624 | /** |
|
| 625 | * Apply the typical age range updated event to the event repository. |
|
| @@ 255-268 (lines=14) @@ | ||
| 252 | * Apply the description updated event to the place repository. |
|
| 253 | * @param DescriptionUpdated $descriptionUpdated |
|
| 254 | */ |
|
| 255 | protected function applyDescriptionUpdated( |
|
| 256 | DescriptionUpdated $descriptionUpdated |
|
| 257 | ) { |
|
| 258 | ||
| 259 | $document = $this->loadPlaceDocumentFromRepository($descriptionUpdated); |
|
| 260 | ||
| 261 | $placeLD = $document->getBody(); |
|
| 262 | if (empty($placeLD->description)) { |
|
| 263 | $placeLD->description = new \stdClass(); |
|
| 264 | } |
|
| 265 | $placeLD->description->{'nl'} = $descriptionUpdated->getDescription(); |
|
| 266 | ||
| 267 | $this->repository->save($document->withBody($placeLD)); |
|
| 268 | } |
|
| 269 | ||
| 270 | /** |
|
| 271 | * Apply the booking info updated event to the place repository. |
|