Path: blob/master/src/infrastructure/diff/view/PHUIDiffInlineCommentView.php
12242 views
<?php12abstract class PHUIDiffInlineCommentView extends AphrontView {34private $isOnRight;5private $renderer;6private $inlineComment;78public function setInlineComment(PhabricatorInlineComment $comment) {9$this->inlineComment = $comment;10return $this;11}1213public function getInlineComment() {14return $this->inlineComment;15}1617public function getIsOnRight() {18return $this->isOnRight;19}2021public function setIsOnRight($on_right) {22$this->isOnRight = $on_right;23return $this;24}2526public function setRenderer($renderer) {27$this->renderer = $renderer;28return $this;29}3031public function getRenderer() {32return $this->renderer;33}3435public function getScaffoldCellID() {36return null;37}3839public function isHidden() {40return false;41}4243public function isHideable() {44return true;45}4647public function newHiddenIcon() {48if ($this->isHideable()) {49return new PHUIDiffRevealIconView();50} else {51return null;52}53}5455protected function getInlineCommentMetadata() {56$viewer = $this->getViewer();57$inline = $this->getInlineComment();5859$is_synthetic = (bool)$inline->getSyntheticAuthor();6061$is_fixed = false;62switch ($inline->getFixedState()) {63case PhabricatorInlineComment::STATE_DONE:64case PhabricatorInlineComment::STATE_DRAFT:65$is_fixed = true;66break;67}6869$is_draft_done = false;70switch ($inline->getFixedState()) {71case PhabricatorInlineComment::STATE_DRAFT:72case PhabricatorInlineComment::STATE_UNDRAFT:73$is_draft_done = true;74break;75}7677return array(78'id' => $inline->getID(),79'phid' => $inline->getPHID(),80'changesetID' => $inline->getChangesetID(),81'number' => $inline->getLineNumber(),82'length' => $inline->getLineLength(),83'isNewFile' => (bool)$inline->getIsNewFile(),84'replyToCommentPHID' => $inline->getReplyToCommentPHID(),85'isDraft' => $inline->isDraft(),86'isFixed' => $is_fixed,87'isGhost' => $inline->getIsGhost(),88'isSynthetic' => $is_synthetic,89'isDraftDone' => $is_draft_done,90'isEditing' => $inline->getIsEditing(),91'documentEngineKey' => $inline->getDocumentEngineKey(),92'startOffset' => $inline->getStartOffset(),93'endOffset' => $inline->getEndOffset(),94'on_right' => $this->getIsOnRight(),95'state' => $inline->getContentStateMap(),96);97}9899100}101102103