private function formValuesToEntity(Form $form, $values)
 {
     $user = UserService::loadFromSession($form->getPresenter()->getUser());
     $values->releaseDate = DateTimeUtils::createDbDatetimeFormatFromDateParts($values->year, $values->month, $values->day, "0", "0", "0");
     if ($values->reservationId == 0) {
         return ReservationService::create($values, $user);
     } else {
         return ReservationService::loadForUpdate($values);
     }
 }
Example #2
0
 private function toEntity(DbEntry $reservation)
 {
     return ReservationService::loadFromDb($reservation);
 }