| @@ 620-632 (lines=13) @@ | ||
| 617 | * Apply the description updated event to the event repository. |
|
| 618 | * @param DescriptionUpdated $descriptionUpdated |
|
| 619 | */ |
|
| 620 | protected function applyDescriptionUpdated( |
|
| 621 | DescriptionUpdated $descriptionUpdated |
|
| 622 | ) { |
|
| 623 | $document = $this->loadDocumentFromRepository($descriptionUpdated); |
|
| 624 | ||
| 625 | $eventLd = $document->getBody(); |
|
| 626 | if (empty($eventLd->description)) { |
|
| 627 | $eventLd->description = new \stdClass(); |
|
| 628 | } |
|
| 629 | $eventLd->description->{'nl'} = $descriptionUpdated->getDescription(); |
|
| 630 | ||
| 631 | $this->repository->save($document->withBody($eventLd)); |
|
| 632 | } |
|
| 633 | ||
| 634 | /** |
|
| 635 | * Apply the typical age range updated event to the event repository. |
|
| @@ 264-277 (lines=14) @@ | ||
| 261 | * Apply the description updated event to the place repository. |
|
| 262 | * @param DescriptionUpdated $descriptionUpdated |
|
| 263 | */ |
|
| 264 | protected function applyDescriptionUpdated( |
|
| 265 | DescriptionUpdated $descriptionUpdated |
|
| 266 | ) { |
|
| 267 | ||
| 268 | $document = $this->loadPlaceDocumentFromRepository($descriptionUpdated); |
|
| 269 | ||
| 270 | $placeLD = $document->getBody(); |
|
| 271 | if (empty($placeLD->description)) { |
|
| 272 | $placeLD->description = new \stdClass(); |
|
| 273 | } |
|
| 274 | $placeLD->description->{'nl'} = $descriptionUpdated->getDescription(); |
|
| 275 | ||
| 276 | $this->repository->save($document->withBody($placeLD)); |
|
| 277 | } |
|
| 278 | ||
| 279 | /** |
|
| 280 | * Apply the booking info updated event to the place repository. |
|