/** * The component to display a single thread */ public function executeShowThread() { $this->thread = ThreadPeer::retrieveByPK($this->threadID); $this->post = PostPeer::getFirstForThreadId($this->threadID); //First are experts anserws ( firest best than other ) //Than are other users answers ( first best than other ) $this->expert_best_posts = PostPeer::getForThreadIdAndFor($this->threadID, $this->post->getId(), true, 1); $this->expert_others_posts = PostPeer::getForThreadIdAndFor($this->threadID, $this->post->getId(), true, 0); $this->other_best_posts = PostPeer::getForThreadIdAndFor($this->threadID, $this->post->getId(), false, 1); $this->other_others_posts = PostPeer::getForThreadIdAndFor($this->threadID, $this->post->getId(), false, 0); }