Пример #1
0
 /**
  * @param \Claroline\ForumBundle\Entity\Category $category
  * @param string                                 $oldName
  * @param string                                 $newName
  */
 public function __construct(Category $category, $oldName, $newName)
 {
     $details = array('category' => array('id' => $category->getId()), 'forum' => array('id' => $category->getForum()->getId()), 'oldName' => $oldName, 'newName' => $newName);
     parent::__construct($category->getForum()->getResourceNode(), $details);
 }
 /**
  * @param \Claroline\ForumBundle\Entity\Category $category
  */
 public function __construct(Category $category)
 {
     $details = array('category' => array('id' => $category->getId()), 'forum' => array('id' => $category->getForum()->getId()));
     parent::__construct($category->getForum()->getResourceNode(), $details);
 }
Пример #3
0
 /**
  * @EXT\Route(
  *     "/subject/{subject}/move/{newCategory}",
  *     name="claro_subject_move",
  *     options={"expose"=true}
  * )
  * @EXT\Method("GET")
  *
  * @param Subject  $subject
  * @param Category $newCategory
  */
 public function moveSubjectAction(Subject $subject, Category $newCategory)
 {
     $forum = $newCategory->getForum();
     $this->checkAccess($forum);
     $this->forumManager->moveSubject($subject, $newCategory);
     return new RedirectResponse($this->generateUrl('claro_forum_categories', array('forum' => $forum->getId())));
 }