Esempio n. 1
0
 /**
  * Count comments
  * @return int
  */
 public function countVisibleComments()
 {
     $criteria = Criteria::create();
     $criteria->where(Criteria::expr()->neq('deleted', true));
     return $this->comments->matching($criteria)->count();
 }
Esempio n. 2
0
 public function removeComment(Comment $comment)
 {
     $this->comments->removeElement($comment);
 }
Esempio n. 3
0
 /**
  * Remove comment
  *
  * @param \Entities\Comment $comment
  */
 public function removeComment(\Entities\Comment $comment)
 {
     $this->comments->removeElement($comment);
 }
 /**
  * @param Comment $comment
  * @return $this
  */
 public function removeComment(Comment $comment)
 {
     $this->comments->remove($comment);
     return $this;
 }
Esempio n. 5
-1
 /**
  * @param Comment $comment
  */
 public function removeComment(Comment $comment)
 {
     if ($this->comments->contains($comment)) {
         $this->comments->removeElement($comment);
     }
 }