/**
  *
  * @access protected
  * @param \CCDNForum\ForumBundle\Entity\Forum $forum
  */
 protected function onSuccess(Forum $forum)
 {
     $this->dispatcher->dispatch(ForumEvents::ADMIN_FORUM_DELETE_SUCCESS, new AdminForumEvent($this->request, $forum));
     if (!$this->form->get('confirm_subordinates')->getData()) {
         $categories = new ArrayCollection($forum->getCategories()->toArray());
         $this->forumModel->reassignCategoriesToForum($categories, null)->flush();
     }
     $this->forumModel->deleteForum($forum);
     $this->dispatcher->dispatch(ForumEvents::ADMIN_FORUM_DELETE_COMPLETE, new AdminForumEvent($this->request, $forum));
 }
 /**
  *
  * @access protected
  * @param \CCDNForum\ForumBundle\Entity\Forum $forum
  */
 protected function onSuccess(Forum $forum)
 {
     $this->dispatcher->dispatch(ForumEvents::ADMIN_FORUM_CREATE_SUCCESS, new AdminForumEvent($this->request, $forum));
     $this->forumModel->saveForum($forum);
     $this->dispatcher->dispatch(ForumEvents::ADMIN_FORUM_CREATE_COMPLETE, new AdminForumEvent($this->request, $forum));
 }