public function __construct(ReservationListItem $item, $location) { parent::__construct($item->item); $this->item = $item; $this->location = $location; if ($this->IsBefore()) { $this->startDate = $this->item->StartDate()->SubtractInterval($this->item->BufferTime()); $this->endDate = $this->item->StartDate(); } else { $this->startDate = $this->item->EndDate(); $this->endDate = $this->item->EndDate()->AddInterval($this->item->BufferTime()); } }
public function __construct(Date $start, Date $end, $resourceId) { $this->start = $start; $this->end = $end; $this->resourceId = $resourceId; parent::__construct(new TestReservationItemView(1, $start, $end, $resourceId)); }