public function orderInlineEditAction(Request $request)
    {
        $value = $request->get('value');
        $manager = $this->getDoctrine()->getManager();
        $repo = $manager->getRepository('LibrinfoEcommerceBundle:Order');

        $order = $repo->find($request->get('id'));

        $propertyAccessor = new PropertyAccessor();
        $propertyAccessor->setValue($order, $request->get('field'), $value);

        $manager->persist($order);
        $manager->flush();

        return new JsonResponse($value);
    }
public function orderInlineEditAction(Request $request)
    {
        $value = $request->get('value');
        $manager = $this->getDoctrine()->getManager();
        $repo = $manager->getRepository('LibrinfoEcommerceBundle:Order');

        $order = $repo->find($request->get('id'));

        $propertyAccessor = new PropertyAccessor();
        $propertyAccessor->setValue($order, $request->get('field'), $value);

        $manager->persist($order);
        $manager->flush();

        return new JsonResponse($value);
    }
public function orderInlineEditAction ( Request $ request ) { $ value = $ request -> get ( 'value' ) ; $ manager = $ this -> getDoctrine ( ) -> getManager ( ) ; $ repo = $ manager -> getRepository ( 'LibrinfoEcommerceBundle:Order' ) ; $ order = $ repo -> find ( $ request -> get ( 'id' ) ) ; $ propertyAccessor = new PropertyAccessor ( ) ; $ propertyAccessor -> setValue ( $ order , $ request -> get ( 'field' ) , $ value ) ; $ manager -> persist ( $ order ) ; $ manager -> flush ( ) ; return new JsonResponse ( $ value ) ; }
Edit order field.

@param Request $request

@return JsonResponse
Edit order field .