/** * action new * * @param Tx_Nboevents_Domain_Model_Person * @dontvalidate $newPerson * @return void */ public function newAction(Tx_Nboevents_Domain_Model_Event $event, Tx_Nboevents_Domain_Model_Person $newPerson = NULL) { if (!isset($newPerson)) { $result = $GLOBALS['TSFE']->fe_user->getKey('ses', 'Tx_Nboevents_Domain_Model_Person'); if ($result) { $person = $this->personRepository->findByUid($result); $this->redirect('edit', NULL, NULL, array('person' => $person, 'event' => $event)); } } $this->view->assign('event', $event); $this->view->assign('newPerson', $newPerson); }
/** * action new * * @dontverifyrequesthash * @return void */ public function newAction(Tx_Nboevents_Domain_Model_Event $event) { //$event = $this->request->hasArgument('event') ? $this->request->getArgument('event') : NULL; $newReservation = $this->request->hasArgument('newReservation') ? $this->request->getArgument('newReservation') : NULL; $newPerson = $this->request->hasArgument('newPerson') ? $this->request->getArgument('newPerson') : NULL; $e = $this->request->hasArgument('e') ? $this->request->getArgument('e') : ''; if (!isset($newPerson)) { $uid = Tx_Nboevents_Utility_Cookies::getCookieValue('Reservation' . $event->getUid()); if ($this->reservationRepository->countByUid($uid)) { $newReservation = $uid; $person = $this->reservationRepository->getPersonUid($newReservation); if ($this->personRepository->countByUid($person)) { $this->redirect('edit', NULL, NULL, array('newReservation' => $newReservation, 'newPerson' => $person, 'event' => $event)); } } $pid = Tx_Nboevents_Utility_Cookies::getCookieValue('Person'); $newPerson = $this->personRepository->findByUid($pid); } $this->view->assign('e', $e); $this->view->assign('event', $event); $this->view->assign('newPerson', $newPerson); $this->view->assign('newReservation', $newReservation); }