src/Flowcode/ShopBundle/Controller/AdminProductOrderStatusController.php
/**
     * Creates a new ProductOrderStatus entity.
     *
     * @Route("/", name="admin_orderstatus_create")
     * @Method("POST")
     * @Template("FlowcodeShopBundle:ProductOrderStatus:new.html.twig")
     */
Creates a new ProductOrderStatus entity.
Creates a new ProductOrderStatus entity .
public function createAction(Request $request)
    {
        $entity = new ProductOrderStatus();
        $form = $this->createCreateForm($entity);
        $form->handleRequest($request);
        if ($form->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $em->persist($entity);
            $em->flush();
            return $this->redirect($this->generateUrl('admin_orderstatus_show', array('id' => $entity->getId())));
        }
        return array(
            'entity' => $entity,
            'form' => $form->createView(),
        );
    }
public function createAction ( Request $ request ) { $ entity = new ProductOrderStatus ( ) ; $ form = $ this -> createCreateForm ( $ entity ) ; $ form -> handleRequest ( $ request ) ; if ( $ form -> isValid ( ) ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ em -> persist ( $ entity ) ; $ em -> flush ( ) ; return $ this -> redirect ( $ this -> generateUrl ( 'admin_orderstatus_show' , array ( 'id' => $ entity -> getId ( ) ) ) ) ; } return array ( 'entity' => $ entity , 'form' => $ form -> createView ( ) , ) ; }
Creates a new ProductOrderStatus entity.
Creates a new ProductOrderStatus entity .