Set recommended
public setRecommended ( string $recommended ) : Newscoop\Entity\Comment | ||
$recommended | string | |
return | Newscoop\Entity\Comment |
/** * Method for update a comment * * @param Comment $entity * @param array $values * * @return Comment $enitity */ public function update(Comment $comment, $values) { // get the enitity manager $em = $this->getEntityManager(); if (array_key_exists('subject', $values) && !is_null($values['subject'])) { $comment->setSubject($values['subject']); } if (array_key_exists('message', $values) && !is_null($values['message'])) { $comment->setMessage($values['message']); } if (array_key_exists('recommended', $values) && !is_null($values['recommended'])) { $comment->setRecommended($values['recommended']); } if (array_key_exists('status', $values) && !is_null($values['status'])) { $comment->setStatus($values['status']); } $comment->setTimeUpdated(new \DateTime()); return $comment; }
public function setRecommended($p_recommended) { $this->__load(); return parent::setRecommended($p_recommended); }
/** * Method for setting recommended for a comment * @param \Newscoop\Entity\Comment $p_comment * @param string $p_recommended * @return void */ public function setCommentRecommended(Comment $p_comment, $p_recommended) { $em = $this->getEntityManager(); $p_comment->setRecommended($p_recommended); $em->persist($p_comment); }