original_string: public function updateAction(MeasureUnit $measureunit, Request $request)
      {
          $editForm = $this->createForm(new MeasureUnitType(), $measureunit, array(
              'action' => $this->generateUrl('admin_shop_measure_unit_update', array('id' => $measureunit->getid())),
              'method' => 'PUT',
          ));
          if ($editForm->handleRequest($request)->isValid()) {
              $this->getDoctrine()->getManager()->flush();
  
              return $this->redirect($this->generateUrl('admin_shop_measure_unit_show', array('id' => $measureunit->getId())));
          }
          $deleteForm = $this->createDeleteForm($measureunit->getId(), 'admin_shop_measure_unit_delete');
  
          return array(
              'measureunit' => $measureunit,
              'edit_form' => $editForm->createView(),
              'delete_form' => $deleteForm->createView(),
          );
      }
code: public function updateAction(MeasureUnit $measureunit, Request $request)
      {
          $editForm = $this->createForm(new MeasureUnitType(), $measureunit, array(
              'action' => $this->generateUrl('admin_shop_measure_unit_update', array('id' => $measureunit->getid())),
              'method' => 'PUT',
          ));
          if ($editForm->handleRequest($request)->isValid()) {
              $this->getDoctrine()->getManager()->flush();
  
              return $this->redirect($this->generateUrl('admin_shop_measure_unit_show', array('id' => $measureunit->getId())));
          }
          $deleteForm = $this->createDeleteForm($measureunit->getId(), 'admin_shop_measure_unit_delete');
  
          return array(
              'measureunit' => $measureunit,
              'edit_form' => $editForm->createView(),
              'delete_form' => $deleteForm->createView(),
          );
      }
code_tokens: public function updateAction ( MeasureUnit $ measureunit , Request $ request ) { $ editForm = $ this -> createForm ( new MeasureUnitType ( ) , $ measureunit , array ( 'action' => $ this -> generateUrl ( 'admin_shop_measure_unit_update' , array ( 'id' => $ measureunit -> getid ( ) ) ) , 'method' => 'PUT' , ) ) ; if ( $ editForm -> handleRequest ( $ request ) -> isValid ( ) ) { $ this -> getDoctrine ( ) -> getManager ( ) -> flush ( ) ; return $ this -> redirect ( $ this -> generateUrl ( 'admin_shop_measure_unit_show' , array ( 'id' => $ measureunit -> getId ( ) ) ) ) ; } $ deleteForm = $ this -> createDeleteForm ( $ measureunit -> getId ( ) , 'admin_shop_measure_unit_delete' ) ; return array ( 'measureunit' => $ measureunit , 'edit_form' => $ editForm -> createView ( ) , 'delete_form' => $ deleteForm -> createView ( ) , ) ; }
docstring: Edits an existing MeasureUnit entity.
  
  @Route("/{id}/update", name="admin_shop_measure_unit_update", requirements={"id"="\d+"})
  @Method("PUT")
  @Template("FlowerStockBundle:MeasureUnit:edit.html.twig")
docstring_tokens: Edits an existing MeasureUnit entity .