| @@ 491-503 (lines=13) @@ | ||
| 488 | * @param GeoCoordinatesUpdated $geoCoordinatesUpdated |
|
| 489 | * @return JsonDocument |
|
| 490 | */ |
|
| 491 | protected function applyGeoCoordinatesUpdated(GeoCoordinatesUpdated $geoCoordinatesUpdated) |
|
| 492 | { |
|
| 493 | $document = $this->loadDocumentFromRepositoryByItemId($geoCoordinatesUpdated->getItemId()); |
|
| 494 | ||
| 495 | $eventLd = $document->getBody(); |
|
| 496 | ||
| 497 | $eventLd->location->geo = (object) [ |
|
| 498 | 'latitude' => $geoCoordinatesUpdated->getCoordinates()->getLatitude()->toDouble(), |
|
| 499 | 'longitude' => $geoCoordinatesUpdated->getCoordinates()->getLongitude()->toDouble(), |
|
| 500 | ]; |
|
| 501 | ||
| 502 | return $document->withBody($eventLd); |
|
| 503 | } |
|
| 504 | ||
| 505 | /** |
|
| 506 | * @param AudienceUpdated $audienceUpdated |
|
| @@ 368-380 (lines=13) @@ | ||
| 365 | * @param GeoCoordinatesUpdated $geoCoordinatesUpdated |
|
| 366 | * @return JsonDocument |
|
| 367 | */ |
|
| 368 | protected function applyGeoCoordinatesUpdated(GeoCoordinatesUpdated $geoCoordinatesUpdated) |
|
| 369 | { |
|
| 370 | $document = $this->loadPlaceDocumentFromRepositoryById($geoCoordinatesUpdated->getItemId()); |
|
| 371 | ||
| 372 | $placeLd = $document->getBody(); |
|
| 373 | ||
| 374 | $placeLd->geo = (object) [ |
|
| 375 | 'latitude' => $geoCoordinatesUpdated->getCoordinates()->getLatitude()->toDouble(), |
|
| 376 | 'longitude' => $geoCoordinatesUpdated->getCoordinates()->getLongitude()->toDouble(), |
|
| 377 | ]; |
|
| 378 | ||
| 379 | return $document->withBody($placeLd); |
|
| 380 | } |
|
| 381 | ||
| 382 | /** |
|
| 383 | * @param string $itemId |
|