Something went wrong. Try again.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
Something went wrong. Try again.
2.5 kB · 101 lines
PHP
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102<?php
abstract class PHUIDiffInlineCommentView extends AphrontView {
private $isOnRight; private $renderer; private $inlineComment;
public function setInlineComment(PhabricatorInlineComment $comment) { $this->inlineComment = $comment; return $this; }
public function getInlineComment() { return $this->inlineComment; }
public function getIsOnRight() { return $this->isOnRight; }
public function setIsOnRight($on_right) { $this->isOnRight = $on_right; return $this; }
public function setRenderer($renderer) { $this->renderer = $renderer; return $this; }
public function getRenderer() { return $this->renderer; }
public function getScaffoldCellID() { return null; }
public function isHidden() { return false; }
public function isHideable() { return true; }
public function newHiddenIcon() { if ($this->isHideable()) { return new PHUIDiffRevealIconView(); } else { return null; } }
protected function getInlineCommentMetadata() { $viewer = $this->getViewer(); $inline = $this->getInlineComment();
$is_synthetic = (bool)$inline->getSyntheticAuthor();
$is_fixed = false; switch ($inline->getFixedState()) { case PhabricatorInlineComment::STATE_DONE: case PhabricatorInlineComment::STATE_DRAFT: $is_fixed = true; break; }
$is_draft_done = false; switch ($inline->getFixedState()) { case PhabricatorInlineComment::STATE_DRAFT: case PhabricatorInlineComment::STATE_UNDRAFT: $is_draft_done = true; break; }
return array( 'id' => $inline->getID(), 'phid' => $inline->getPHID(), 'changesetID' => $inline->getChangesetID(), 'number' => $inline->getLineNumber(), 'length' => $inline->getLineLength(), 'isNewFile' => (bool)$inline->getIsNewFile(), 'replyToCommentPHID' => $inline->getReplyToCommentPHID(), 'isDraft' => $inline->isDraft(), 'isFixed' => $is_fixed, 'isGhost' => $inline->getIsGhost(), 'isSynthetic' => $is_synthetic, 'isDraftDone' => $is_draft_done, 'isEditing' => $inline->getIsEditing(), 'documentEngineKey' => $inline->getDocumentEngineKey(), 'startOffset' => $inline->getStartOffset(), 'endOffset' => $inline->getEndOffset(), 'on_right' => $this->getIsOnRight(), 'state' => $inline->getContentStateMap(), ); }
}