/**
  * @Route("/{slug}/delete", name="forum_thread_delete")
  * @ParamConverter("forum", class="StreamPerkForumBundle:Forum", options={"mapping": {"forumSlug": "slug"}})
  * @ParamConverter("thread", class="StreamPerkForumBundle:ForumThread", options={"mapping": {"forum": "forum", "slug": "slug"}})
  * @Security("is_granted('SHOW', forum) and is_granted('SHOW', thread) and is_granted('DELETE', thread)")
  */
 public function deleteAction(Forum $forum, ForumThread $thread)
 {
     $this->get('streamperk.forum_thread_manager')->removeAndFlush($thread);
     return $this->redirectToRoute('forum_view', ['slug' => $forum->getSlug()]);
 }
 /**
  * @Route("/{id}/delete", name="forum_thread_post_delete")
  * @ParamConverter("forum", class="StreamPerkForumBundle:Forum", options={"mapping": {"forumSlug": "slug"}})
  * @ParamConverter("thread", class="StreamPerkForumBundle:ForumThread", options={"mapping": {"forum": "forum", "threadSlug": "slug"}})
  * @ParamConverter("post", class="StreamPerkForumBundle:ForumThreadPost", options={"mapping": {"forum": "forum", "thread": "thread", "id": "id"}})
  * @Security("is_granted('SHOW', forum) and is_granted('SHOW', thread) and is_granted('SHOW', post) and is_granted('DELETE', post)")
  */
 public function deleteAction(Forum $forum, ForumThread $thread, ForumThreadPost $post)
 {
     $this->get('streamperk.forum_thread_post_manager')->removeAndFlush($post);
     return $this->redirectToRoute('forum_thread_index', ['forumSlug' => $forum->getSlug(), 'slug' => $thread->getSlug()]);
 }