Ejemplo n.º 1
0
 /**
  * Process changed status of a comment
  * Comment is already persisted to DB
  *
  * @param Comment $comment Comment
  *
  * @return void
  */
 public function processCommentStatusChanged(Comment $comment)
 {
     if ($comment->isValid()) {
         $subscriber = $this->subscriberRepository->findForSubscriptionMail($comment);
         if ($subscriber instanceof Subscriber) {
             $this->sendOptInMail($subscriber, $comment);
         }
         $this->notifySubscribers($comment);
         $this->persistToDatabase();
         $this->flushFrontendCache();
     }
 }