Skip to content

Commit

Permalink
Merge pull request #63 from cultuurnet/feature/WID-485-attendance-mode
Browse files Browse the repository at this point in the history
WID-485 Extend with attendance mode and online url
  • Loading branch information
LucWollants authored Jun 29, 2022
2 parents e1fa9d4 + 089e7f5 commit 053f02c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/ValueObjects/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ final class Event extends Offer
*/
private $subEvents = [];

/**
* @var string
* @Type("string")
*/
private $attendanceMode = 'offline';

/**
* @var string|null
* @Type("string")
*/
private $onlineUrl;

public function getLocation(): ?Place
{
return $this->location;
Expand Down Expand Up @@ -80,4 +92,24 @@ 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;
}

public function getOnlineUrl(): ?string
{
return $this->onlineUrl;
}

public function setOnlineUrl(?string $onlineUrl): void
{
$this->onlineUrl = $onlineUrl;
}
}
3 changes: 3 additions & 0 deletions test/Serializer/SerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down
2 changes: 2 additions & 0 deletions test/Serializer/data/search-with-embed-and-facets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit 053f02c

Please sign in to comment.