src/Flowcode/ShopBundle/Controller/InventoryController.php
/**
     * Displays a form to edit an existing Inventory entity.
     *
     * @Route("/{id}/edit", name="stock_inventory_edit", requirements={"id"="\d+"})
     * @Method("GET")
     * @Template()
     */
Displays a form to edit an existing Inventory entity.
Displays a form to edit an existing Inventory entity .
public function editAction(Inventory $inventory)
    {
        $editForm = $this->createForm(new InventoryType(), $inventory, array(
            'action' => $this->generateUrl('stock_inventory_update', array('id' => $inventory->getid())),
            'method' => 'PUT',
        ));
        $deleteForm = $this->createDeleteForm($inventory->getId(), 'stock_inventory_delete');
        return array(
            'inventory' => $inventory,
            'edit_form' => $editForm->createView(),
            'delete_form' => $deleteForm->createView(),
        );
    }
public function editAction ( Inventory $ inventory ) { $ editForm = $ this -> createForm ( new InventoryType ( ) , $ inventory , array ( 'action' => $ this -> generateUrl ( 'stock_inventory_update' , array ( 'id' => $ inventory -> getid ( ) ) ) , 'method' => 'PUT' , ) ) ; $ deleteForm = $ this -> createDeleteForm ( $ inventory -> getId ( ) , 'stock_inventory_delete' ) ; return array ( 'inventory' => $ inventory , 'edit_form' => $ editForm -> createView ( ) , 'delete_form' => $ deleteForm -> createView ( ) , ) ; }
Displays a form to edit an existing Inventory entity.
Displays a form to edit an existing Inventory entity .