コード例 #1
0
 protected function buildInlineComment(PhabricatorInlineCommentInterface $comment, $on_right = false)
 {
     $user = $this->getUser();
     $edit = $user && $comment->getAuthorPHID() == $user->getPHID() && $comment->isDraft() && $this->getShowEditAndReplyLinks();
     $allow_reply = (bool) $user && $this->getShowEditAndReplyLinks();
     $allow_done = !$comment->isDraft() && $this->getCanMarkDone();
     return id(new PHUIDiffInlineCommentDetailView())->setUser($user)->setInlineComment($comment)->setIsOnRight($on_right)->setHandles($this->getHandles())->setMarkupEngine($this->getMarkupEngine())->setEditable($edit)->setAllowReply($allow_reply)->setCanMarkDone($allow_done)->setObjectOwnerPHID($this->getObjectOwnerPHID());
 }
コード例 #2
0
 private function renderInlineComment(PhabricatorInlineCommentInterface $comment)
 {
     $user = $this->user;
     $edit = $user && $comment->getAuthorPHID() == $user->getPHID() && $comment->isDraft();
     $allow_reply = (bool) $this->user;
     $on_right = $this->isCommentOnRightSideWhenDisplayed($comment);
     return id(new DifferentialInlineCommentView())->setInlineComment($comment)->setOnRight($on_right)->setHandles($this->handles)->setMarkupEngine($this->markupEngine)->setEditable($edit)->setAllowReply($allow_reply)->render();
 }
コード例 #3
0
 protected function buildInlineComment(PhabricatorInlineCommentInterface $comment, $on_right = false)
 {
     $user = $this->getUser();
     $edit = $user && $comment->getAuthorPHID() == $user->getPHID() && $comment->isDraft();
     $allow_reply = (bool) $user;
     return id(new DifferentialInlineCommentView())->setInlineComment($comment)->setOnRight($on_right)->setHandles($this->getHandles())->setMarkupEngine($this->getMarkupEngine())->setEditable($edit)->setAllowReply($allow_reply);
 }