src/Flowcode/ShopBundle/Controller/AdminProductItemFieldDataController.php
/**
     * Edits an existing ProductItemFieldData entity.
     *
     * @Route("/{id}/update", name="admin_productitemfielddata_update", requirements={"id"="\d+"})
     * @Method("PUT")
     * @Template("AmulenShopBundle:ProductItemFieldData:edit.html.twig")
     */
Edits an existing ProductItemFieldData entity.
Edits an existing ProductItemFieldData entity .
public function updateAction(ProductItemFieldData $productitemfielddata, Request $request)
    {
        $editForm = $this->createForm($this->get("amulen.shop.form.product.item.field.data"), $productitemfielddata, array(
            'action' => $this->generateUrl('admin_productitemfielddata_update', array('id' => $productitemfielddata->getid())),
            'method' => 'PUT',
        ));
        if ($editForm->handleRequest($request)->isValid()) {
            $this->getDoctrine()->getManager()->flush();
            return $this->redirect($this->generateUrl('admin_productitemfielddata_show', array('id' => $productitemfielddata->getId())));
        }
        $deleteForm = $this->createDeleteForm($productitemfielddata->getId(), 'admin_productitemfielddata_delete');
        return array(
            'productitemfielddata' => $productitemfielddata,
            'edit_form' => $editForm->createView(),
            'delete_form' => $deleteForm->createView(),
        );
    }
public function updateAction ( ProductItemFieldData $ productitemfielddata , Request $ request ) { $ editForm = $ this -> createForm ( $ this -> get ( " amulen.shop.form.product.item.field.data " ) , $ productitemfielddata , array ( 'action' => $ this -> generateUrl ( 'admin_productitemfielddata_update' , array ( 'id' => $ productitemfielddata -> getid ( ) ) ) , 'method' => 'PUT' , ) ) ; if ( $ editForm -> handleRequest ( $ request ) -> isValid ( ) ) { $ this -> getDoctrine ( ) -> getManager ( ) -> flush ( ) ; return $ this -> redirect ( $ this -> generateUrl ( 'admin_productitemfielddata_show' , array ( 'id' => $ productitemfielddata -> getId ( ) ) ) ) ; } $ deleteForm = $ this -> createDeleteForm ( $ productitemfielddata -> getId ( ) , 'admin_productitemfielddata_delete' ) ; return array ( 'productitemfielddata' => $ productitemfielddata , 'edit_form' => $ editForm -> createView ( ) , 'delete_form' => $ deleteForm -> createView ( ) , ) ; }
Edits an existing ProductItemFieldData entity.
Edits an existing ProductItemFieldData entity .