src/Flowcode/ShopBundle/Controller/AdminProductItemFieldDataController.php
/**
     * Creates a new ProductItemFieldData entity.
     *
     * @Route("/create", name="admin_productitemfielddata_create")
     * @Method("POST")
     * @Template("AmulenShopBundle:ProductItemFieldData:new.html.twig")
     */
Creates a new ProductItemFieldData entity.
Creates a new ProductItemFieldData entity .
public function createAction(Request $request)
    {
        $productitemfielddata = new ProductItemFieldData();
        $form = $this->createForm($this->get("amulen.shop.form.product.item.field.data"), $productitemfielddata);
        if ($form->handleRequest($request)->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $em->persist($productitemfielddata);
            $em->flush();
            return $this->redirect($this->generateUrl('admin_productitemfielddata_show', array('id' => $productitemfielddata->getId())));
        }
        return array(
            'productitemfielddata' => $productitemfielddata,
            'form' => $form->createView(),
        );
    }
public function createAction ( Request $ request ) { $ productitemfielddata = new ProductItemFieldData ( ) ; $ form = $ this -> createForm ( $ this -> get ( " amulen.shop.form.product.item.field.data " ) , $ productitemfielddata ) ; if ( $ form -> handleRequest ( $ request ) -> isValid ( ) ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ em -> persist ( $ productitemfielddata ) ; $ em -> flush ( ) ; return $ this -> redirect ( $ this -> generateUrl ( 'admin_productitemfielddata_show' , array ( 'id' => $ productitemfielddata -> getId ( ) ) ) ) ; } return array ( 'productitemfielddata' => $ productitemfielddata , 'form' => $ form -> createView ( ) , ) ; }
Creates a new ProductItemFieldData entity.
Creates a new ProductItemFieldData entity .