/**
  * Updates a contact
  *
  * @param Contact $contact
  * @validate $contact \CPSIT\T3eventsReservation\Domain\Validator\ContactValidator
  * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
  * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException
  */
 public function updateAction(Contact $contact)
 {
     $this->contactRepository->update($contact);
     $this->redirect('edit', self::PARENT_CONTROLLER_NAME, null, ['reservation' => $contact->getReservation()]);
 }
 /**
  * action delete
  *
  * @param Reservation $reservation
  * @return void
  */
 public function deleteAction(Reservation $reservation)
 {
     $this->addFlashMessage($this->translate('message.reservation.delete.success'));
     if ($participants = $reservation->getParticipants()) {
         foreach ($participants as $participant) {
             $this->personRepository->remove($participant);
         }
     }
     if ($company = $reservation->getCompany()) {
         $this->companyRepository->remove($company);
     }
     if ($contact = $reservation->getContact()) {
         $this->contactRepository->remove($contact);
     }
     $this->reservationRepository->remove($reservation);
     $this->session->clean();
 }