Newscoop\Entity\Comment::setStatus PHP Метод

setStatus() публичный Метод

Set status string
public setStatus ( $status ) : Newscoop\Entity\Comment
Результат Newscoop\Entity\Comment
    public function setStatus($status)
    {
        $status_enum = array_flip(self::$status_enum);
        $this->status = $status_enum[$status];
        return $this;
    }

Usage Example

Пример #1
0
 /**
  * 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;
 }
All Usage Examples Of Newscoop\Entity\Comment::setStatus