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