Newscoop\ArticlesBundle\Entity\EditorialComment::setResolved PHP Метод

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

Sets the value of resolved.
public setResolved ( boolean $resolved ) : self
$resolved boolean the resolved
Результат self
    public function setResolved($resolved)
    {
        $this->resolved = $resolved;
        return $this;
    }

Usage Example

 /**
  * Resolve existing editorial comment
  * @param EditorialComment $comment
  * @param User             $user
  */
 public function resolve(EditorialComment $comment, User $user, $value = true)
 {
     if ($comment->getUser()->getId() == $user->getId() || $user->isAdmin()) {
         $comment->setResolved($value);
     } else {
         throw new AccessDeniedHttpException("User is not allowed to resolve comment");
     }
     $this->em->flush();
     return true;
 }
All Usage Examples Of Newscoop\ArticlesBundle\Entity\EditorialComment::setResolved