| @@ 622-634 (lines=13) @@ | ||
| 619 | * @param GeoCoordinatesUpdated $geoCoordinatesUpdated |
|
| 620 | * @return JsonDocument |
|
| 621 | */ |
|
| 622 | protected function applyGeoCoordinatesUpdated(GeoCoordinatesUpdated $geoCoordinatesUpdated) |
|
| 623 | { |
|
| 624 | $document = $this->loadDocumentFromRepositoryByItemId($geoCoordinatesUpdated->getItemId()); |
|
| 625 | ||
| 626 | $eventLd = $document->getBody(); |
|
| 627 | ||
| 628 | $eventLd->location->geo = (object) [ |
|
| 629 | 'latitude' => $geoCoordinatesUpdated->getCoordinates()->getLatitude()->toDouble(), |
|
| 630 | 'longitude' => $geoCoordinatesUpdated->getCoordinates()->getLongitude()->toDouble(), |
|
| 631 | ]; |
|
| 632 | ||
| 633 | return $document->withBody($eventLd); |
|
| 634 | } |
|
| 635 | ||
| 636 | /** |
|
| 637 | * @param AudienceUpdated $audienceUpdated |
|
| @@ 374-386 (lines=13) @@ | ||
| 371 | * @param GeoCoordinatesUpdated $geoCoordinatesUpdated |
|
| 372 | * @return JsonDocument |
|
| 373 | */ |
|
| 374 | protected function applyGeoCoordinatesUpdated(GeoCoordinatesUpdated $geoCoordinatesUpdated) |
|
| 375 | { |
|
| 376 | $document = $this->loadPlaceDocumentFromRepositoryById($geoCoordinatesUpdated->getItemId()); |
|
| 377 | ||
| 378 | $placeLd = $document->getBody(); |
|
| 379 | ||
| 380 | $placeLd->geo = (object) [ |
|
| 381 | 'latitude' => $geoCoordinatesUpdated->getCoordinates()->getLatitude()->toDouble(), |
|
| 382 | 'longitude' => $geoCoordinatesUpdated->getCoordinates()->getLongitude()->toDouble(), |
|
| 383 | ]; |
|
| 384 | ||
| 385 | return $document->withBody($placeLd); |
|
| 386 | } |
|
| 387 | ||
| 388 | /** |
|
| 389 | * @param OrganizerProjectedToJSONLD $organizerProjectedToJSONLD |
|