Differential D21276 Diff 50670 src/applications/audit/storage/PhabricatorAuditTransactionComment.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/audit/storage/PhabricatorAuditTransactionComment.php
| Show All 11 Lines | final class PhabricatorAuditTransactionComment | ||||
| protected $lineLength = 0; | protected $lineLength = 0; | ||||
| protected $fixedState; | protected $fixedState; | ||||
| protected $hasReplies = 0; | protected $hasReplies = 0; | ||||
| protected $replyToCommentPHID; | protected $replyToCommentPHID; | ||||
| protected $legacyCommentID; | protected $legacyCommentID; | ||||
| protected $attributes = array(); | protected $attributes = array(); | ||||
| private $replyToComment = self::ATTACHABLE; | private $replyToComment = self::ATTACHABLE; | ||||
| private $inlineContext = self::ATTACHABLE; | |||||
| public function getApplicationTransactionObject() { | public function getApplicationTransactionObject() { | ||||
| return new PhabricatorAuditTransaction(); | return new PhabricatorAuditTransaction(); | ||||
| } | } | ||||
| public function shouldUseMarkupCache($field) { | public function shouldUseMarkupCache($field) { | ||||
| // Only cache submitted comments. | // Only cache submitted comments. | ||||
| return ($this->getTransactionPHID() != null); | return ($this->getTransactionPHID() != null); | ||||
| ▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | public function getAttribute($key, $default = null) { | ||||
| return idx($this->attributes, $key, $default); | return idx($this->attributes, $key, $default); | ||||
| } | } | ||||
| public function setAttribute($key, $value) { | public function setAttribute($key, $value) { | ||||
| $this->attributes[$key] = $value; | $this->attributes[$key] = $value; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function isEmptyInlineComment() { | |||||
| return !strlen($this->getContent()); | |||||
| } | |||||
| public function newInlineCommentObject() { | public function newInlineCommentObject() { | ||||
| return PhabricatorAuditInlineComment::newFromModernComment($this); | return PhabricatorAuditInlineComment::newFromModernComment($this); | ||||
| } | } | ||||
| public function getInlineContext() { | |||||
| return $this->assertAttached($this->inlineContext); | |||||
| } | |||||
| public function attachInlineContext( | |||||
| PhabricatorInlineCommentContext $context = null) { | |||||
| $this->inlineContext = $context; | |||||
| return $this; | |||||
| } | |||||
| } | } | ||||