src/Flowcode/ShopBundle/Controller/StockTransferController.php
/**
     * Displays a form to create a new StockTransfer entity.
     *
     * @Route("/new", name="stock_transfers_new")
     * @Method("GET")
     * @Template()
     */
Displays a form to create a new StockTransfer entity.
Displays a form to create a new StockTransfer entity .
public function newAction()
    {
        $stocktransfer = new StockTransfer();
        $nextCode = $this->get('flower.stock.service.stock_transfer')->getNextCode();
        $stocktransfer->setCode($nextCode);
        $stocktransfer->setUser($this->getUser());
        $form = $this->createForm(new StockTransferType(), $stocktransfer);
        return array(
            'stocktransfer' => $stocktransfer,
            'form' => $form->createView(),
        );
    }
public function newAction ( ) { $ stocktransfer = new StockTransfer ( ) ; $ nextCode = $ this -> get ( 'flower.stock.service.stock_transfer' ) -> getNextCode ( ) ; $ stocktransfer -> setCode ( $ nextCode ) ; $ stocktransfer -> setUser ( $ this -> getUser ( ) ) ; $ form = $ this -> createForm ( new StockTransferType ( ) , $ stocktransfer ) ; return array ( 'stocktransfer' => $ stocktransfer , 'form' => $ form -> createView ( ) , ) ; }
Displays a form to create a new StockTransfer entity.
Displays a form to create a new StockTransfer entity .