main/core/Controller/HomeController.php
public function reorderAction($type, $a, Content $b = null, Content $father = null)
    {
        try {
            $this->manager->reorderContent($type, $a, $b, $father);

            return new Response('true');
        } catch (\Exception $e) {
            return new Response('false'); //useful in ajax
        }
    }
public function reorderAction($type, $a, Content $b = null, Content $father = null)
    {
        try {
            $this->manager->reorderContent($type, $a, $b, $father);

            return new Response('true');
        } catch (\Exception $e) {
            return new Response('false'); //useful in ajax
        }
    }
public function reorderAction ( $ type , $ a , Content $ b = null , Content $ father = null ) { try { $ this -> manager -> reorderContent ( $ type , $ a , $ b , $ father ) ; return new Response ( 'true' ) ; } catch ( \ Exception $ e ) { return new Response ( 'false' ) ; //useful in ajax } }
Reorder contents in types. This method is used by ajax.
The response is the word true in a string in success, otherwise false.

@param string $type   The type of the content
@param string $a      The id of the content 1
@param string $b      The id of the content 2
@param string $father The father content

@Route("/content/reorder/{type}/{a}/{b}/{father}", requirements={"a" = "\d+"}, name="claroline_content_reorder")

@Secure(roles="ROLE_HOME_MANAGER")

@ParamConverter("type", class = "ClarolineCoreBundle:Home\Type", options = {"mapping": {"type": "name"}})

@ParamConverter("a", class = "ClarolineCoreBundle:Content", options = {"id" = "a"})
@ParamConverter("b", class = "ClarolineCoreBundle:Content", options = {"id" = "b"})
@ParamConverter("father", class = "ClarolineCoreBundle:Content", options = {"id" = "father"})

@return \Symfony\Component\HttpFoundation\Response
Reorder contents in types . This method is used by ajax . The response is the word true in a string in success otherwise false .