original_string: public function deleteAction(MeasureUnit $measureunit, Request $request)
      {
          $form = $this->createDeleteForm($measureunit->getId(), 'admin_shop_measure_unit_delete');
          if ($form->handleRequest($request)->isValid()) {
              $em = $this->getDoctrine()->getManager();
              $em->remove($measureunit);
              $em->flush();
          }
  
          return $this->redirect($this->generateUrl('admin_shop_measure_unit'));
      }
code: public function deleteAction(MeasureUnit $measureunit, Request $request)
      {
          $form = $this->createDeleteForm($measureunit->getId(), 'admin_shop_measure_unit_delete');
          if ($form->handleRequest($request)->isValid()) {
              $em = $this->getDoctrine()->getManager();
              $em->remove($measureunit);
              $em->flush();
          }
  
          return $this->redirect($this->generateUrl('admin_shop_measure_unit'));
      }
code_tokens: public function deleteAction ( MeasureUnit $ measureunit , Request $ request ) { $ form = $ this -> createDeleteForm ( $ measureunit -> getId ( ) , 'admin_shop_measure_unit_delete' ) ; if ( $ form -> handleRequest ( $ request ) -> isValid ( ) ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ em -> remove ( $ measureunit ) ; $ em -> flush ( ) ; } return $ this -> redirect ( $ this -> generateUrl ( 'admin_shop_measure_unit' ) ) ; }
docstring: Deletes a MeasureUnit entity.
  
  @Route("/{id}/delete", name="admin_shop_measure_unit_delete", requirements={"id"="\d+"})
  @Method("DELETE")
docstring_tokens: Deletes a MeasureUnit entity .