Пример #1
0
 /**
  * Store information about activity.
  *
  * <code>
  * $userId = 1;
  * $content = "...";
  *
  * $activity = new Prism\Integration\Activity\SocialCommunity($userId, $content);
  * $activity->setDb(JFactory::getDbo());
  * $activity->store();
  * </code>
  */
 public function store()
 {
     $activity = new Activity(\JFactory::getDbo());
     $activity->set('content', $this->content);
     $activity->set('user_id', $this->user_id);
     if ($this->image !== null) {
         $activity->set('image', $this->image);
     }
     if ($this->url !== null) {
         $activity->set('url', $this->url);
     }
     $activity->store();
 }
Пример #2
0
 /**
  * Store information about activity.
  *
  * <code>
  * $userId = 1;
  * $content = "...";
  *
  * $activity = new Prism\Integration\Activity\SocialCommunity($userId, $content);
  * $activity->setDb(JFactory::getDbo());
  * $activity->store();
  * </code>
  */
 public function store()
 {
     $activity = new Activity(\JFactory::getDbo());
     $activity->set("content", $this->content);
     $activity->set("user_id", $this->user_id);
     if (!empty($this->image)) {
         $activity->set("image", $this->image);
     }
     if (!empty($this->url)) {
         $activity->set("url", $this->url);
     }
     $activity->store();
 }