setStatus() public method

Set status string
public setStatus ( $status ) : Newscoop\Entity\Comment
return Newscoop\Entity\Comment
 /**
  * Mark comment as removed
  *
  * @param Comment $comment
  *
  * @return Comment
  */
 public function remove($comment)
 {
     $comment->setStatus('deleted');
     $this->em->flush();
     $cacheService = \Zend_Registry::get('container')->getService('newscoop.cache');
     $cacheService->clearNamespace('comment');
     return $comment;
 }
 public function setStatus($p_status)
 {
     $this->__load();
     return parent::setStatus($p_status);
 }
 /**
  * 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;
 }