/**
  * Store information about activity.
  *
  * <code>
  * $userId = 1;
  * $content = "...";
  *
  * $activity = new Prism\Integration\Activity\Gamification($userId, $content);
  * $activity->store();
  * </code>
  */
 public function store()
 {
     $activity = new Activity($this->db);
     $activity->setContent($this->getContent());
     $activity->setUserId($this->getUserId());
     if ($this->title !== null) {
         $activity->setTitle($this->getTitle());
     }
     if ($this->image !== null) {
         $activity->setImage($this->getImage());
     }
     if ($this->url !== null) {
         $activity->setUrl($this->getUrl());
     }
     $activity->store();
 }
Пример #2
0
 /**
  * Store information about activity.
  *
  * <code>
  * $userId = 1;
  * $content = "...";
  *
  * $activity = new Prism\Integration\Activity\Gamification($userId, $content);
  * $activity->store();
  * </code>
  */
 public function store()
 {
     $activity = new Activity(\JFactory::getDbo());
     $activity->setContent($this->getContent());
     $activity->setUserId($this->getUserId());
     if (!empty($this->title)) {
         $activity->setTitle($this->getTitle());
     }
     if (!empty($this->image)) {
         $activity->setImage($this->getImage());
     }
     if (!empty($this->url)) {
         $activity->setUrl($this->getUrl());
     }
     $activity->store();
 }