Esempio n. 1
0
 /**
  * Construct method.
  *
  * @param CommentInterface $comment Comment
  * @param VoteInterface    $vote    Vote
  * @param bool             $edited  Vote is edition of one already added
  */
 public function __construct(CommentInterface $comment, VoteInterface $vote, $edited)
 {
     parent::__construct($comment);
     $this->vote = $vote;
     $this->edited = $edited;
 }
 /**
  * on Comment change
  *
  * @param AbstractCommentEvent $event Event
  */
 public function onCommentChange(AbstractCommentEvent $event)
 {
     $comment = $event->getComment();
     $this->commentCache->invalidateCache($comment->getSource(), $comment->getContext());
 }