public function updateAction(AnnouncementAggregate $aggregate, Announcement $announcement, Request $request)
    {
        $this->checkPermission('EDIT', $aggregate->getResourceNode(), [], true);

        /** @var Announcement $announcement */
        $announcement = $this->crud->update($this->getClass(), $this->decodeRequest($request), [
          'announcement_aggregate' => $aggregate,
        ]);

        return new JsonResponse(
            $this->serializer->serialize($announcement),
            201
        );
    }
public function updateAction(AnnouncementAggregate $aggregate, Announcement $announcement, Request $request)
    {
        $this->checkPermission('EDIT', $aggregate->getResourceNode(), [], true);

        /** @var Announcement $announcement */
        $announcement = $this->crud->update($this->getClass(), $this->decodeRequest($request), [
          'announcement_aggregate' => $aggregate,
        ]);

        return new JsonResponse(
            $this->serializer->serialize($announcement),
            201
        );
    }
public function updateAction ( AnnouncementAggregate $ aggregate , Announcement $ announcement , Request $ request ) { $ this -> checkPermission ( 'EDIT' , $ aggregate -> getResourceNode ( ) , [ ] , true ) ; /** @var Announcement $announcement */ $ announcement = $ this -> crud -> update ( $ this -> getClass ( ) , $ this -> decodeRequest ( $ request ) , [ 'announcement_aggregate' => $ aggregate , ] ) ; return new JsonResponse ( $ this -> serializer -> serialize ( $ announcement ) , 201 ) ; }
Updates an existing announce.

@EXT\Route("/{id}", name="claro_announcement_update")
@EXT\Method("PUT")
@EXT\ParamConverter(
"announcement",
class="ClarolineAnnouncementBundle:Announcement",
options={"mapping": {"id": "uuid"}}
)

@param AnnouncementAggregate $aggregate
@param Announcement          $announcement
@param Request               $request

@return JsonResponse
Updates an existing announce .