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()); }
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(); }
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); }