Example #1
0
 /**
  * Register new Shift from type ShiftType
  * @param WorkingDay $workingDay
  * @param ShiftType $shiftType
  * @param int $amountOfDrivers
  * @param int $status
  * @param bool $manuallyEdited
  * @return Shift
  */
 public static function registerShift(WorkingDay $workingDay, ShiftType $shiftType, $amountOfDrivers = 0, $status = self::OPEN, $manuallyEdited = false)
 {
     $shift = new Shift();
     $shift->setWorkingDay($workingDay);
     $shift->setShiftType($shiftType);
     $shift->setAmountOfDrivers($amountOfDrivers);
     $shift->setStatus($status);
     $shift->setManuallyEdited($manuallyEdited);
     return $shift;
 }