public function setBasketTitleAction(Request $request, Basket $basket)
    {
        $basket->setName($request->get('name'));

        /** @var EntityManager $em */
        $em = $this->app['orm.em'];
        $em->persist($basket);
        $em->flush();

        return Result::create($request, ["basket" => $this->listBasket($basket)])->createResponse();
    }
public function setBasketTitleAction(Request $request, Basket $basket)
    {
        $basket->setName($request->get('name'));

        /** @var EntityManager $em */
        $em = $this->app['orm.em'];
        $em->persist($basket);
        $em->flush();

        return Result::create($request, ["basket" => $this->listBasket($basket)])->createResponse();
    }
public function setBasketTitleAction ( Request $ request , Basket $ basket ) { $ basket -> setName ( $ request -> get ( 'name' ) ) ; /** @var EntityManager $em */ $ em = $ this -> app [ 'orm.em' ] ; $ em -> persist ( $ basket ) ; $ em -> flush ( ) ; return Result :: create ( $ request , [ "basket" => $ this -> listBasket ( $ basket ) ] ) -> createResponse ( ) ; }
Change the name of one basket

@param  Request $request
@param  Basket  $basket

@return Response
Change the name of one basket