parentId; } /** * @param Id $parentId */ public function setParentId(Id $parentId) { $this->parentId = $parentId; } /** * @return Recurring */ public function getRecurring() { return $this->recurring; } /** * @param Recurring $recurring */ public function setRecurring(Recurring $recurring) { $this->recurring = $recurring; } /** * @return IntegerValue */ public function getMaxCapacity() { return $this->maxCapacity; } /** * @param IntegerValue $maxCapacity */ public function setMaxCapacity(IntegerValue $maxCapacity) { $this->maxCapacity = $maxCapacity; } /** * @return BooleanValueObject */ public function getShow() { return $this->show; } /** * @param BooleanValueObject $show */ public function setShow(BooleanValueObject $show) { $this->show = $show; } /** * @return Collection */ public function getBookings() { return $this->bookings; } /** * @param Collection $bookings */ public function setBookings(Collection $bookings) { $this->bookings = $bookings; } /** * @return Collection */ public function getPeriods() { return $this->periods; } /** * @param Collection $periods */ public function setPeriods(Collection $periods) { $this->periods = $periods; } /** * @return DateTimeValue */ public function getBookingOpens() { return $this->bookingOpens; } /** * @param DateTimeValue|null $bookingOpens */ public function setBookingOpens(DateTimeValue $bookingOpens = null) { $this->bookingOpens = $bookingOpens; } /** * @return DateTimeValue */ public function getBookingCloses() { return $this->bookingCloses; } /** * @param DateTimeValue|null $bookingCloses */ public function setBookingCloses(DateTimeValue $bookingCloses = null) { $this->bookingCloses = $bookingCloses; } /** * @return BookingStatus */ public function getStatus() { return $this->status; } /** * @param BookingStatus $status */ public function setStatus(BookingStatus $status) { $this->status = $status; } /** * @return Collection */ public function getTags() { return $this->tags; } /** * @param Collection $tags */ public function setTags(Collection $tags) { $this->tags = $tags; } /** * @return Collection */ public function getGallery() { return $this->gallery; } /** * @param Collection $gallery */ public function setGallery(Collection $gallery) { $this->gallery = $gallery; } /** * @return Collection */ public function getProviders() { return $this->providers; } /** * @param Collection $providers */ public function setProviders(Collection $providers) { $this->providers = $providers; } /** * @return bool */ public function isNotifyParticipants() { return $this->notifyParticipants; } /** * @param bool $notifyParticipants */ public function setNotifyParticipants($notifyParticipants) { $this->notifyParticipants = $notifyParticipants; } /** * @return Id */ public function getLocationId() { return $this->locationId; } /** * @param Id $locationId */ public function setLocationId(Id $locationId) { $this->locationId = $locationId; } /** * @return Name */ public function getCustomLocation() { return $this->customLocation; } /** * @param Name $customLocation */ public function setCustomLocation(Name $customLocation) { $this->customLocation = $customLocation; } /** * @return DateTimeValue */ public function getCreated() { return $this->created; } /** * @param DateTimeValue $created */ public function setCreated(DateTimeValue $created) { $this->created = $created; } /** * @return BookingType */ public function getType() { return new Bookingtype(Entities::EVENT); } /** * @return array */ public function toArray() { return array_merge( parent::toArray(), [ 'bookings' => $this->getBookings() ? $this->getBookings()->toArray() : [], 'periods' => $this->getPeriods()->toArray(), 'bookingOpens' => $this->getBookingOpens() ? $this->getBookingOpens()->getValue()->format('Y-m-d H:i:s') : null, 'bookingCloses' => $this->getBookingCloses() ? $this->getBookingCloses()->getValue()->format('Y-m-d H:i:s') : null, 'status' => $this->getStatus() ? $this->getStatus()->getValue() : null, 'recurring' => $this->getRecurring() ? $this->getRecurring()->toArray() : null, 'maxCapacity' => $this->getMaxCapacity() ? $this->getMaxCapacity()->getValue() : null, 'show' => $this->getShow() ? $this->getShow()->getValue() : null, 'tags' => $this->getTags() ? $this->getTags()->toArray() : null, 'gallery' => $this->getGallery() ? $this->getGallery()->toArray() : [], 'providers' => $this->getProviders() ? $this->getProviders()->toArray() : [], 'notifyParticipants' => $this->isNotifyParticipants(), 'locationId' => $this->getLocationId() ? $this->getLocationId()->getValue() : null, 'customLocation' => $this->getCustomLocation() ? $this->getCustomLocation()->getValue() : null, 'parentId' => $this->getParentId() ? $this->getParentId()->getValue() : null, 'created' => $this->getCreated() ? $this->getCreated()->getValue()->format('Y-m-d H:i:s') : null, 'type' => $this->getType()->getValue(), ] ); } }