src/acme/sitioBundle/Controller/tipoWidgetController.php
/**
     * Creates a new tipoWidget entity.
     *
     */
Creates a new tipoWidget entity.
Creates a new tipoWidget entity .
public function createAction(Request $request)
    {
        $entity = new tipoWidget();
        $form = $this->createCreateForm($entity);
        $form->handleRequest($request);
        if ($form->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $em->persist($entity);
            $em->flush();
            return $this->redirect($this->generateUrl('tipowidget_show', array('id' => $entity->getId())));
        }
        return $this->render('sitioBundle:tipoWidget:new.html.twig', array(
            'entity' => $entity,
            'form'   => $form->createView(),
        ));
    }
public function createAction ( Request $ request ) { $ entity = new tipoWidget ( ) ; $ form = $ this -> createCreateForm ( $ entity ) ; $ form -> handleRequest ( $ request ) ; if ( $ form -> isValid ( ) ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ em -> persist ( $ entity ) ; $ em -> flush ( ) ; return $ this -> redirect ( $ this -> generateUrl ( 'tipowidget_show' , array ( 'id' => $ entity -> getId ( ) ) ) ) ; } return $ this -> render ( 'sitioBundle:tipoWidget:new.html.twig' , array ( 'entity' => $ entity , 'form' => $ form -> createView ( ) , ) ) ; }
Creates a new tipoWidget entity.
Creates a new tipoWidget entity .