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