예제 #1
0
 public function onSuccessCommentRemoval(Comment $comment, $id)
 {
     /** @var \Users\User $user */
     $user = $this->user->getIdentity();
     $pageLink = $this->linkGenerator->link('Pages:Front:Page:show', ['internal_id' => $comment->getPageId()]);
     $this->appEventLogger->saveLog(sprintf('User [%s#%s] <b>has REMOVED</b> the Comment [%s#] of Author [%s] on the <a href="%s">Page [%s#%s]</a>', $user->getId(), $user->getUsername(), $id, $comment->getAuthor(), $pageLink, $comment->getPageId(), $comment->getPageTitle()), 'page_comment_release', $user->getId());
 }
예제 #2
0
파일: Comment.php 프로젝트: blitzik/CMS
 /**
  * @param Comment $reaction
  */
 public function addReaction(Comment $reaction)
 {
     if ($reaction->getPageId() !== $this->page->getId()) {
         throw new WrongPageCommentReaction();
     }
     $this->reactions->add($reaction);
 }