コード例 #1
0
ファイル: Deleter.php プロジェクト: gpuck/FOSMessageBundle
 /**
  * Marks the thread as undeleted by the current authenticated user
  *
  * @param ThreadInterface $thread
  */
 public function markAsUndeleted(ThreadInterface $thread)
 {
     if (!$this->authorizer->canDeleteThread($thread)) {
         throw new AccessDeniedException('You are not allowed to delete this thread');
     }
     $thread->setIsDeletedByParticipant($this->getAuthenticatedParticipant(), false);
     $this->dispatcher->dispatch(FOSMessageEvents::POST_UNDELETE, new ThreadEvent($thread));
 }