| @@ 623-635 (lines=13) @@ | ||
| 620 | * @param GeoCoordinatesUpdated $geoCoordinatesUpdated |
|
| 621 | * @return JsonDocument |
|
| 622 | */ |
|
| 623 | protected function applyGeoCoordinatesUpdated(GeoCoordinatesUpdated $geoCoordinatesUpdated) |
|
| 624 | { |
|
| 625 | $document = $this->loadDocumentFromRepositoryByItemId($geoCoordinatesUpdated->getItemId()); |
|
| 626 | ||
| 627 | $eventLd = $document->getBody(); |
|
| 628 | ||
| 629 | $eventLd->location->geo = (object) [ |
|
| 630 | 'latitude' => $geoCoordinatesUpdated->getCoordinates()->getLatitude()->toDouble(), |
|
| 631 | 'longitude' => $geoCoordinatesUpdated->getCoordinates()->getLongitude()->toDouble(), |
|
| 632 | ]; |
|
| 633 | ||
| 634 | return $document->withBody($eventLd); |
|
| 635 | } |
|
| 636 | ||
| 637 | /** |
|
| 638 | * @param AudienceUpdated $audienceUpdated |
|
| @@ 360-372 (lines=13) @@ | ||
| 357 | * @param GeoCoordinatesUpdated $geoCoordinatesUpdated |
|
| 358 | * @return JsonDocument |
|
| 359 | */ |
|
| 360 | protected function applyGeoCoordinatesUpdated(GeoCoordinatesUpdated $geoCoordinatesUpdated) |
|
| 361 | { |
|
| 362 | $document = $this->loadPlaceDocumentFromRepositoryById($geoCoordinatesUpdated->getItemId()); |
|
| 363 | ||
| 364 | $placeLd = $document->getBody(); |
|
| 365 | ||
| 366 | $placeLd->geo = (object) [ |
|
| 367 | 'latitude' => $geoCoordinatesUpdated->getCoordinates()->getLatitude()->toDouble(), |
|
| 368 | 'longitude' => $geoCoordinatesUpdated->getCoordinates()->getLongitude()->toDouble(), |
|
| 369 | ]; |
|
| 370 | ||
| 371 | return $document->withBody($placeLd); |
|
| 372 | } |
|
| 373 | ||
| 374 | /** |
|
| 375 | * @param string $itemId |
|