public function onSuccessImageRemoval($imageName) { $rearSlashPosition = mb_strpos($imageName, '/'); $imageID = mb_substr($imageName, 0, $rearSlashPosition); $imageOriginalName = mb_substr($imageName, $rearSlashPosition + 1); $this->appEventLogger->saveLog(sprintf('User [%s#%s] <b>has REMOVED</b> the Image [%s#%s]', $this->user->getId(), $this->user->getUsername(), $imageID, $imageOriginalName), 'image_removal', $this->user->getId()); }
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()); }
public function onSuccessTagRemoval(Tag $tag, $id) { $this->appEventLogger->saveLog(sprintf('User [%s#%s] <b>has REMOVED</b> Tag [%s#%s]', $this->user->getId(), $this->user->getUsername(), $id, $tag->getName()), 'page_tag_removal', $this->user->getId()); }
public function onSuccessOptionsSaving() { /** @var \Users\User $user */ $user = $this->user->getIdentity(); $this->appEventLogger->saveLog(sprintf('User [%s#%s] <b>has EDITED</b> web options', $user->getId(), $user->getUsername()), 'options_editing', $user->getId()); }
public function onSuccessRolePermissionsEditing(Role $role) { $this->appEventLogger->saveLog(sprintf('User [%s#%s] <b>has EDITED</b> permissions of Role [%s#%s]', $this->user->getId(), $this->user->getUsername(), $role->getId(), $role->getName()), 'user_role_editing', $this->user->getId()); }
public function onPageCommentsClosure(Page $page) { $this->appEventLogger->saveLog($this->createLogMessage('User [%s#%s] <b>has CLOSED</b> comments on <a href="%s">Page%s [%s#%s]</a>', $page), 'page_comments_closure', $page->getAuthorId()); }
public function onUrlNotFound(UrlPath $urlPath) { $this->appEventLogger->saveLog(sprintf('<b>[404]</b> Url "%s" <b>NOT found</b>', $urlPath->getPath()), '404'); }