コード例 #1
0
 /**
  * Tells if the current user can delete this thread
  *
  * @param ThreadInterface $thread
  * @return bool
  */
 public function canDelete(ThreadInterface $thread)
 {
     if (!array_key_exists('can_delete_' . $thread->getId(), $this->cache)) {
         $this->cache['can_delete_' . $thread->getId()] = $this->authorizer->canDeleteThread($thread);
     }
     return $this->cache['can_delete_' . $thread->getId()];
 }