/** * * @access protected * @param \CCDNForum\ForumBundle\Entity\Post $post */ protected function onSuccess(Post $post) { $post->setUnlockedDate(new \Datetime('now')); $post->setUnlockedBy($this->user); $this->dispatcher->dispatch(ForumEvents::MODERATOR_POST_UNLOCK_SUCCESS, new ModeratorPostEvent($this->request, $this->post)); $this->postModel->updatePost($post); $this->dispatcher->dispatch(ForumEvents::MODERATOR_POST_UNLOCK_COMPLETE, new ModeratorPostEvent($this->request, $post)); }