getTags())); } public function hasComments() { foreach ($this->getComments() as $comment) { if ($comment->getActive()) { return true; } } return false; } public function countActiveComments() { $criteria = new \Criteria(); $criteria->addAscendingOrderByColumn(CommentPeer::CREATED_AT); $criteria->addAnd(CommentPeer::ACTIVE, true); $criteria->addAnd(CommentPeer::POST_ID, $this->getId()); return CommentPeer::doCount($criteria); } public function getOrderedComments() { $criteria = new \Criteria(); $criteria->addAscendingOrderByColumn(CommentPeer::CREATED_AT); $criteria->addAnd(CommentPeer::ACTIVE, true); return $this->getComments($criteria); } public function getActiveFollowers() { return PostFollowerQuery::create()->filterByPost($this)->filterByActive(true)->find(); } public function getElasticContent() { return strip_tags($this->getContent()); } }