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