コード例 #1
0
 /**
  * @Route("/{id}")
  * @Method("PUT")
  */
 public function putAction(SocialActivity $socialActivity)
 {
     if ($this->getUser() !== $socialActivity->getRecipient()) {
         throw $this->createNotFoundException();
     }
     //only ignore
     $data = json_decode($this->getRequest()->getContent(), true);
     if (isset($data['ignore'])) {
         $socialActivity->setIgnore($data['ignore']);
     }
     $this->getDoctrine()->getManager()->flush($socialActivity);
     return $this->createJSONResponse('', 200);
 }
 public function setIgnore($ignore)
 {
     $this->__load();
     return parent::setIgnore($ignore);
 }