/**
  * @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);
 }
Exemplo n.º 2
0
 /**
  * @return null|TimeInterval
  */
 public function BufferTime()
 {
     return $this->item->GetBufferTime();
 }
Exemplo n.º 3
0
 /**
  * @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;
 }