original_string: public function createAction(Request $request)
      {
          $stocktransferitem = new StockTransferItem();
          $form = $this->createForm(new StockTransferItemType(), $stocktransferitem);
          if ($form->handleRequest($request)->isValid()) {
              $em = $this->getDoctrine()->getManager();
              $em->persist($stocktransferitem);
              $em->flush();
  
              return $this->redirect($this->generateUrl('stock_transfers_show', array(
                  'id' => $stocktransferitem->getStockTransfer()->getId(),
              )));
          }
  
          return array(
              'stocktransferitem' => $stocktransferitem,
              'form' => $form->createView(),
          );
      }
code: public function createAction(Request $request)
      {
          $stocktransferitem = new StockTransferItem();
          $form = $this->createForm(new StockTransferItemType(), $stocktransferitem);
          if ($form->handleRequest($request)->isValid()) {
              $em = $this->getDoctrine()->getManager();
              $em->persist($stocktransferitem);
              $em->flush();
  
              return $this->redirect($this->generateUrl('stock_transfers_show', array(
                  'id' => $stocktransferitem->getStockTransfer()->getId(),
              )));
          }
  
          return array(
              'stocktransferitem' => $stocktransferitem,
              'form' => $form->createView(),
          );
      }
code_tokens: public function createAction ( Request $ request ) { $ stocktransferitem = new StockTransferItem ( ) ; $ form = $ this -> createForm ( new StockTransferItemType ( ) , $ stocktransferitem ) ; if ( $ form -> handleRequest ( $ request ) -> isValid ( ) ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ em -> persist ( $ stocktransferitem ) ; $ em -> flush ( ) ; return $ this -> redirect ( $ this -> generateUrl ( 'stock_transfers_show' , array ( 'id' => $ stocktransferitem -> getStockTransfer ( ) -> getId ( ) , ) ) ) ; } return array ( 'stocktransferitem' => $ stocktransferitem , 'form' => $ form -> createView ( ) , ) ; }
docstring: Creates a new StockTransferItem entity.
  
  @Route("/create", name="stock_transfersitem_create")
  @Method("POST")
  @Template("FlowerStockBundle:StockTransferItem:new.html.twig")
docstring_tokens: Creates a new StockTransferItem entity .