main/core/Controller/HomeController.php
public function createAction($type = null, $father = null, Request $request)
    {
        if ($id = $this->manager->createContent($request->get('home_content'), $type, $father)) {
            return new Response($id);
        }

        return new Response('false'); //useful in ajax
    }
public function createAction($type = null, $father = null, Request $request)
    {
        if ($id = $this->manager->createContent($request->get('home_content'), $type, $father)) {
            return new Response($id);
        }

        return new Response('false'); //useful in ajax
    }
public function createAction ( $ type = null , $ father = null , Request $ request ) { if ( $ id = $ this -> manager -> createContent ( $ request -> get ( 'home_content' ) , $ type , $ father ) ) { return new Response ( $ id ) ; } return new Response ( 'false' ) ; //useful in ajax }
Create new content by POST method. This is used by ajax.
The response is the id of the new content in success, otherwise the response is the false word in a string.

@Route(
"/content/create/{type}/{father}",
name="claroline_content_create",
defaults={"type" = "home", "father" = null}
)

@Secure(roles="ROLE_HOME_MANAGER")

@return \Symfony\Component\HttpFoundation\Response
Create new content by POST method . This is used by ajax . The response is the id of the new content in success otherwise the response is the false word in a string .