src/AppBundle/Controller/MarinaHumedaTarifaController.php
/**
     * Creates a new marinaHumedaTarifa entity.
     *
     * @Route("/nueva", name="marinahumeda-tarifas_new")
     * @Method({"GET", "POST"})
     */
Creates a new marinaHumedaTarifa entity.
Creates a new marinaHumedaTarifa entity .
public function newAction(Request $request)
    {
        $marinaHumedaTarifa = new Marinahumedatarifa();
        $form = $this->createForm('AppBundle\Form\MarinaHumedaTarifaType', $marinaHumedaTarifa);
        $form->handleRequest($request);
        if ($form->isSubmitted() && $form->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $em->persist($marinaHumedaTarifa);
            $em->flush();
            return $this->redirectToRoute('marinahumeda-tarifas_index');
        }
        return $this->render('marinahumeda/tarifa/new.html.twig', [
            'title' => 'Nueva tarifa',
            'marinaHumedaTarifa' => $marinaHumedaTarifa,
            'form' => $form->createView()
        ]);
    }
public function newAction ( Request $ request ) { $ marinaHumedaTarifa = new Marinahumedatarifa ( ) ; $ form = $ this -> createForm ( 'AppBundle\Form\MarinaHumedaTarifaType' , $ marinaHumedaTarifa ) ; $ form -> handleRequest ( $ request ) ; if ( $ form -> isSubmitted ( ) && $ form -> isValid ( ) ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ em -> persist ( $ marinaHumedaTarifa ) ; $ em -> flush ( ) ; return $ this -> redirectToRoute ( 'marinahumeda-tarifas_index' ) ; } return $ this -> render ( 'marinahumeda/tarifa/new.html.twig' , [ 'title' => 'Nueva tarifa' , 'marinaHumedaTarifa' => $ marinaHumedaTarifa , 'form' => $ form -> createView ( ) ] ) ; }
Creates a new marinaHumedaTarifa entity.
Creates a new marinaHumedaTarifa entity .