/** * @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); }
private static function getCommentMentionedHTML(SocialActivity $entity) { return '<p><strong>' . htmlspecialchars($entity->getTarget()['first_name']) . '</strong> mentioned you in a comment</p>'; }
public function getTextMessage() { $this->__load(); return parent::getTextMessage(); }