/**
  * Adds Question to array of user's followed
  * questions
  * and adds user details to array of Question's followers
  *
  * @return object $this
  */
 protected function followQuestion()
 {
     /**
      * For consistant behaviour it is
      * Best is to go through FollowManager and don't
      * do this manually
      */
     FollowManager::factory($this->Registry)->followQuestion($this->Registry->Viewer, $this->Question);
     return $this;
 }
Example #2
0
 /**
  * Answer author will automatically
  * start following this question
  *
  * @return object $this
  */
 protected function followQuestion()
 {
     $FollowManager = new FollowManager($this->Registry);
     $FollowManager->followQuestion($this->Registry->Viewer, $this->Question);
     return $this;
 }
Example #3
0
 /**
  * Comment author will automatically
  * start following this question
  * but only if comment is for a question
  * not if it's for an answer
  *
  * @return object $this
  */
 protected function followQuestion()
 {
     d('cp');
     if ($this->Resource instanceof \Lampcms\Question) {
         $FollowManager = new FollowManager($this->Registry);
         $FollowManager->followQuestion($this->Registry->Viewer, $this->Resource);
     }
     return $this;
 }