public function onSuccessCommentRelease(Comment $comment) { /** @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 RELEASED</b> the <a href="%s#comment-%s">Comment [%s#]</a> of Author [%s#] on the <a href="%s">Page [%s#%s]</a>', $user->getId(), $user->getUsername(), $pageLink, $comment->getId(), $comment->getId(), $comment->getAuthor(), $pageLink, $comment->getPageId(), $comment->getPageTitle()), 'page_comment_release', $user->getId()); }
private function refresh($message, $type, array $snippets = null) { if ($this->presenter->isAjax()) { if ($snippets === null) { return; } if (empty($snippets)) { $this->redrawControl(); return; } foreach ($snippets as $snippet) { $this->redrawControl($snippet); } } else { $this->flashMessage($message, $type); $this->redirect('this#comment-' . $this->comment->getId()); } }
/** * @param Comment $comment * @throws ActionFailedException */ public function remove(Comment $comment) { $id = $comment->getId(); $this->commentRemover->remove($comment); $this->onSuccessCommentRemoval($comment, $id); }