/** * @param Reservation $instance * @param ReservationSeries $series * @param IReservedItemView $existingItem * @param BookableResource[] $keyedResources * @return bool */ protected function IsInConflict(Reservation $instance, ReservationSeries $series, IReservedItemView $existingItem, $keyedResources) { if ($existingItem->GetId() == $instance->ReservationId() || $series->IsMarkedForDelete($existingItem->GetId()) || $series->IsMarkedForUpdate($existingItem->GetId())) { return false; } return parent::IsInConflict($instance, $series, $existingItem, $keyedResources); }
/** * @return null|TimeInterval */ public function BufferTime() { return $this->item->GetBufferTime(); }
/** * @param Reservation $instance * @param ReservationSeries $series * @param IReservedItemView $existingItem * @param BookableResource[] $keyedResources * @return bool */ protected function IsInConflict(Reservation $instance, ReservationSeries $series, IReservedItemView $existingItem, $keyedResources) { if (array_key_exists($existingItem->GetResourceId(), $keyedResources)) { return $existingItem->BufferedTimes()->Overlaps($instance->Duration()); } return false; }