public function nodesFormAction(Request $request)
    {
        $node = new Node();
        // Manage edition mode
        $this->currentNode = $request->get('node');
        if ($this->currentNode) {
            $node = $this->get("ydle.node.manager")->find($request->get('node'));
        }
        $action = $this->get('router')->generate('submitNodeForm', array('node' => $this->currentNode));

        $form = $this->createForm("node_form", $node);
        $form->handleRequest($request);

        return $this->render('YdleHubBundle:Nodes:form.html.twig', array(
            'action' => $action,
            'entry' => $node,
            'form' => $form->createView()
        ));
    }
public function nodesFormAction(Request $request)
    {
        $node = new Node();
        // Manage edition mode
        $this->currentNode = $request->get('node');
        if ($this->currentNode) {
            $node = $this->get("ydle.node.manager")->find($request->get('node'));
        }
        $action = $this->get('router')->generate('submitNodeForm', array('node' => $this->currentNode));

        $form = $this->createForm("node_form", $node);
        $form->handleRequest($request);

        return $this->render('YdleHubBundle:Nodes:form.html.twig', array(
            'action' => $action,
            'entry' => $node,
            'form' => $form->createView()
        ));
    }
public function nodesFormAction ( Request $ request ) { $ node = new Node ( ) ; // Manage edition mode $ this -> currentNode = $ request -> get ( 'node' ) ; if ( $ this -> currentNode ) { $ node = $ this -> get ( "ydle.node.manager" ) -> find ( $ request -> get ( 'node' ) ) ; } $ action = $ this -> get ( 'router' ) -> generate ( 'submitNodeForm' , array ( 'node' => $ this -> currentNode ) ) ; $ form = $ this -> createForm ( "node_form" , $ node ) ; $ form -> handleRequest ( $ request ) ; return $ this -> render ( 'YdleHubBundle:Nodes:form.html.twig' , array ( 'action' => $ action , 'entry' => $ node , 'form' => $ form -> createView ( ) ) ) ; }
Display a form to create or edit a node.

@param Request $request
Display a form to create or edit a node .