コード例 #1
0
ファイル: Wish.php プロジェクト: noelboss/nbowishlist
 /**
  * Return the shares of the Participation related to this event
  *
  * @return float share
  */
 public function getParticipationShare()
 {
     $shares = 0;
     $wish = $this->getUid();
     if ($this->getShares() > 0) {
         $participation = Tx_Nboevents_Utility_Cookies::getCookieValue('Participation' . $wish);
         if ($participation) {
             $repo = t3lib_div::makeInstance('Tx_Nbowishlist_Domain_Repository_ParticipationRepository');
             $shares = $repo->sharesByParticipationAndWish($participation, $wish);
         }
     }
     return $shares;
 }
コード例 #2
0
 /**
  * action delete
  *
  * @param $participation
  * @param $wish
  * @return void
  */
 public function deleteAction(Tx_Nbowishlist_Domain_Model_Participation $participation, Tx_Nbowishlist_Domain_Model_Wish $wish)
 {
     $this->participationRepository->remove($participation);
     Tx_Nboevents_Utility_Cookies::setCookieValue('Participation' . $wish->getUid(), NULL);
     $this->flashMessageContainer->add('<h3>Danke!</h3>Deine Geschenk-Beitrag wurde gelöscht.');
     $this->redirect('show', 'Wish', NULL, array('wish' => $wish));
 }
コード例 #3
0
ファイル: Event.php プロジェクト: noelboss/nboevents
 /**
  * Event has Reservation
  *
  * @return boolean
  */
 public function getHasReservation()
 {
     $result = Tx_Nboevents_Utility_Cookies::getCookieValue('Reservation' . $this->getUid());
     $has = false;
     if ($result > 0) {
         $reservationRepository = t3lib_div::makeInstance('Tx_Nboevents_Domain_Repository_ReservationRepository');
         if ($reservationRepository->countByUid($result)) {
             $has = true;
         }
     }
     return $has;
 }
コード例 #4
0
 /**
  * action delete
  *
  * @param $reservation
  * @param $event
  * @return void
  */
 public function deleteAction(Tx_Nboevents_Domain_Model_Reservation $reservation, Tx_Nboevents_Domain_Model_Event $event)
 {
     $this->reservationRepository->remove($reservation);
     Tx_Nboevents_Utility_Cookies::setCookieValue('Reservation' . $event->getUid(), NULL);
     $this->flashMessageContainer->add('<h3>Danke!</h3>Deine Anmeldung wurde gelöscht.');
     $this->redirect('show', 'Event', NULL, array('event' => $event));
 }