Esempio n. 1
0
 public function getData($options)
 {
     $offer = parent::getData($options);
     $offer->processStateOffer = CI_ProcessState::getData($options->processStateOffer);
     $offer->type = CI_OfferType::getData($options->type);
     $offer->quantityUsersToPaused = $options->quantityUsersToPaused;
     if (isset($options->id)) {
         $offer->favorites = CI_Offer::getFavorite($options->id);
     }
     return $offer;
 }
Esempio n. 2
0
 public function getData($options)
 {
     $request = parent::getData($options);
     if (isset($options->id)) {
         $request->votes = CI_Request::getVote($options->id);
         $request->favorites = CI_Request::getFavorite($options->id);
         $request->amountCollected = CI_Request::getAmountCollectedById($options->id);
         $request->quantityDonated = CI_Request::getQuantityDonatedById($options->id);
     } else {
         $request->votes = 0;
     }
     $request->sponsors = CI_Sponsor::getData($options->sponsors);
     if (isset($options->isVote)) {
         $request->isVote = $options->isVote;
     }
     return $request;
 }