/** * Toggles the checkout state of the given allocation and position in allocationCells. * $allocationId : id of allocation * $posn : position within allocationCells to toggle (multiple checkout dates may be possible for any given allocation) */ function toggleCheckoutOnBookingDate($allocationId, $posn) { // find out the date that was toggled by adding the offset to minDate $checkoutDate = clone $this->showMinDate; $checkoutDate->add(new DateInterval('P' . $posn . 'D')); AllocationDBO::toggleCheckoutOnBookingDate($allocationId, $checkoutDate); }