| @@ 587-599 (lines=13) @@ | ||
| 584 | * @param GeoCoordinatesUpdated $geoCoordinatesUpdated |
|
| 585 | * @return JsonDocument |
|
| 586 | */ |
|
| 587 | protected function applyGeoCoordinatesUpdated(GeoCoordinatesUpdated $geoCoordinatesUpdated) |
|
| 588 | { |
|
| 589 | $document = $this->loadDocumentFromRepositoryByItemId($geoCoordinatesUpdated->getItemId()); |
|
| 590 | ||
| 591 | $eventLd = $document->getBody(); |
|
| 592 | ||
| 593 | $eventLd->location->geo = (object) [ |
|
| 594 | 'latitude' => $geoCoordinatesUpdated->getCoordinates()->getLatitude()->toDouble(), |
|
| 595 | 'longitude' => $geoCoordinatesUpdated->getCoordinates()->getLongitude()->toDouble(), |
|
| 596 | ]; |
|
| 597 | ||
| 598 | return $document->withBody($eventLd); |
|
| 599 | } |
|
| 600 | ||
| 601 | /** |
|
| 602 | * @param AudienceUpdated $audienceUpdated |
|
| @@ 379-391 (lines=13) @@ | ||
| 376 | * @param GeoCoordinatesUpdated $geoCoordinatesUpdated |
|
| 377 | * @return JsonDocument |
|
| 378 | */ |
|
| 379 | protected function applyGeoCoordinatesUpdated(GeoCoordinatesUpdated $geoCoordinatesUpdated) |
|
| 380 | { |
|
| 381 | $document = $this->loadPlaceDocumentFromRepositoryById($geoCoordinatesUpdated->getItemId()); |
|
| 382 | ||
| 383 | $placeLd = $document->getBody(); |
|
| 384 | ||
| 385 | $placeLd->geo = (object) [ |
|
| 386 | 'latitude' => $geoCoordinatesUpdated->getCoordinates()->getLatitude()->toDouble(), |
|
| 387 | 'longitude' => $geoCoordinatesUpdated->getCoordinates()->getLongitude()->toDouble(), |
|
| 388 | ]; |
|
| 389 | ||
| 390 | return $document->withBody($placeLd); |
|
| 391 | } |
|
| 392 | ||
| 393 | /** |
|
| 394 | * @param OrganizerProjectedToJSONLD $organizerProjectedToJSONLD |
|