src/AppBundle/Controller/CuentaBancariaController.php
/**
     * Creates a new cuentaBancarium entity.
     *
     * @Route("/nuevo", name="cuenta-bancaria_new")
     * @Method({"GET", "POST"})
     */
Creates a new cuentaBancarium entity.
Creates a new cuentaBancarium entity .
public function newAction(Request $request)
    {
        $cuentaBancarium = new Cuentabancaria();
        $form = $this->createForm('AppBundle\Form\CuentaBancariaType', $cuentaBancarium);
        $form->handleRequest($request);
        if ($form->isSubmitted() && $form->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $em->persist($cuentaBancarium);
            $em->flush();
            return $this->redirectToRoute('cuenta-bancaria_index');
        }
        return $this->render('cuentabancaria/new.html.twig', array(
            'cuentaBancarium' => $cuentaBancarium,
            'form' => $form->createView(),
            'title' => 'Nueva cuenta bancaria'
        ));
    }
public function newAction ( Request $ request ) { $ cuentaBancarium = new Cuentabancaria ( ) ; $ form = $ this -> createForm ( 'AppBundle\Form\CuentaBancariaType' , $ cuentaBancarium ) ; $ form -> handleRequest ( $ request ) ; if ( $ form -> isSubmitted ( ) && $ form -> isValid ( ) ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ em -> persist ( $ cuentaBancarium ) ; $ em -> flush ( ) ; return $ this -> redirectToRoute ( 'cuenta-bancaria_index' ) ; } return $ this -> render ( 'cuentabancaria/new.html.twig' , array ( 'cuentaBancarium' => $ cuentaBancarium , 'form' => $ form -> createView ( ) , 'title' => 'Nueva cuenta bancaria' ) ) ; }
Creates a new cuentaBancarium entity.
Creates a new cuentaBancarium entity .