Controller/ShippingMethodController.php
public function addAction(Request $request)
    {
        $shipmentMethod = new ShippingMethod();

        $form = $this->createForm(ShippingMethodType::class, $shipmentMethod);

        if($form->handleRequest($request)->isValid())
        {
            $em = $this->getDoctrine()->getEntityManager();
            $em->persist($shipmentMethod);
            $em->flush();

            return $this->redirectToRoute('shipping_method_table');
        }

        return $this->render('DyweeOrderBundle:ShippingMethod:add.html.twig', array('form' => $form->createView()));
    }
public function addAction(Request $request)
    {
        $shipmentMethod = new ShippingMethod();

        $form = $this->createForm(ShippingMethodType::class, $shipmentMethod);

        if($form->handleRequest($request)->isValid())
        {
            $em = $this->getDoctrine()->getEntityManager();
            $em->persist($shipmentMethod);
            $em->flush();

            return $this->redirectToRoute('shipping_method_table');
        }

        return $this->render('DyweeOrderBundle:ShippingMethod:add.html.twig', array('form' => $form->createView()));
    }
@param Request $request
@return mixed

@Route(name="shipping_method_add", path="admin/shipment/method/add")