From 394d86ab9b350fcee34464d70177c5e6a4572389 Mon Sep 17 00:00:00 2001 From: Luc Wollants Date: Tue, 28 Jun 2022 17:14:35 +0200 Subject: [PATCH 1/4] Add attendance mode --- src/ValueObjects/Event.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/ValueObjects/Event.php b/src/ValueObjects/Event.php index cdb17bc4..612293ca 100644 --- a/src/ValueObjects/Event.php +++ b/src/ValueObjects/Event.php @@ -35,6 +35,12 @@ final class Event extends Offer */ private $subEvents = []; + /** + * @var string + * @Type("string") + */ + private $attendanceMode = 'offline'; + public function getLocation(): ?Place { return $this->location; @@ -80,4 +86,15 @@ public function setBookingInfo(BookingInfo $bookingInfo): void { $this->bookingInfo = $bookingInfo; } + + public function getAttendanceMode(): string + { + return $this->attendanceMode; + } + + public function setAttendanceMode(string $attendanceMode): void + { + $this->attendanceMode = $attendanceMode; + } + } From 59cd52b8e16c358c88d1a4cf6ac1740dee5b85ed Mon Sep 17 00:00:00 2001 From: Luc Wollants Date: Tue, 28 Jun 2022 17:14:44 +0200 Subject: [PATCH 2/4] Add online url --- src/ValueObjects/Event.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/ValueObjects/Event.php b/src/ValueObjects/Event.php index 612293ca..bccbee12 100644 --- a/src/ValueObjects/Event.php +++ b/src/ValueObjects/Event.php @@ -41,6 +41,12 @@ final class Event extends Offer */ private $attendanceMode = 'offline'; + /** + * @var string|null + * @Type("string") + */ + private $onlineUrl; + public function getLocation(): ?Place { return $this->location; @@ -97,4 +103,13 @@ public function setAttendanceMode(string $attendanceMode): void $this->attendanceMode = $attendanceMode; } + public function getOnlineUrl(): ?string + { + return $this->onlineUrl; + } + + public function setOnlineUrl(?string $onlineUrl): void + { + $this->onlineUrl = $onlineUrl; + } } From a867c7396052dd6ae12544f896bd600bb4d630bb Mon Sep 17 00:00:00 2001 From: Luc Wollants Date: Tue, 28 Jun 2022 17:15:09 +0200 Subject: [PATCH 3/4] Update JSON with attendance mode and online url --- test/Serializer/data/search-with-embed-and-facets.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/Serializer/data/search-with-embed-and-facets.json b/test/Serializer/data/search-with-embed-and-facets.json index abc07de9..0a00da7b 100644 --- a/test/Serializer/data/search-with-embed-and-facets.json +++ b/test/Serializer/data/search-with-embed-and-facets.json @@ -70,6 +70,8 @@ "calendarType": "multiple", "startDate": "2021-01-21T23:00:00+00:00", "endDate": "2021-03-04T22:59:59+00:00", + "attendanceMode": "mixed", + "onlineUrl": "https://www.livestream.be/", "status": { "type": "Available", "reason": { From 089e7f53518f28caedba4262770a3a7efed69364 Mon Sep 17 00:00:00 2001 From: Luc Wollants Date: Tue, 28 Jun 2022 17:15:21 +0200 Subject: [PATCH 4/4] Set the attendance mode and online url --- test/Serializer/SerializerTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/Serializer/SerializerTest.php b/test/Serializer/SerializerTest.php index 403ef735..55a366fa 100644 --- a/test/Serializer/SerializerTest.php +++ b/test/Serializer/SerializerTest.php @@ -146,6 +146,9 @@ public function testDeserializeMethodForResultsWithEmbedAndFacets(): void ) ); + $event->setAttendanceMode('mixed'); + $event->setOnlineUrl('https://www.livestream.be/'); + $subEvent1 = new Event(); $subEvent1->setStatus(new Status('Available')); $subEvent1->setStartDate(new \DateTime('2021-01-21T23:00:00+00:00'));