Differential D20843 Diff 49695 src/applications/differential/render/DifferentialChangesetRenderer.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/render/DifferentialChangesetRenderer.php
Show All 29 Lines | abstract class DifferentialChangesetRenderer extends Phobject { | ||||
private $mask; | private $mask; | ||||
private $originalCharacterEncoding; | private $originalCharacterEncoding; | ||||
private $showEditAndReplyLinks; | private $showEditAndReplyLinks; | ||||
private $canMarkDone; | private $canMarkDone; | ||||
private $objectOwnerPHID; | private $objectOwnerPHID; | ||||
private $highlightingDisabled; | private $highlightingDisabled; | ||||
private $scopeEngine = false; | private $scopeEngine = false; | ||||
private $depthOnlyLines; | private $depthOnlyLines; | ||||
private $documentEngineBlocks; | |||||
private $oldFile = false; | private $oldFile = false; | ||||
private $newFile = false; | private $newFile = false; | ||||
abstract public function getRendererKey(); | abstract public function getRendererKey(); | ||||
public function setShowEditAndReplyLinks($bool) { | public function setShowEditAndReplyLinks($bool) { | ||||
$this->showEditAndReplyLinks = $bool; | $this->showEditAndReplyLinks = $bool; | ||||
▲ Show 20 Lines • Show All 188 Lines • ▼ Show 20 Lines | abstract class DifferentialChangesetRenderer extends Phobject { | ||||
public function setOldChangesetID($old_changeset_id) { | public function setOldChangesetID($old_changeset_id) { | ||||
$this->oldChangesetID = $old_changeset_id; | $this->oldChangesetID = $old_changeset_id; | ||||
return $this; | return $this; | ||||
} | } | ||||
protected function getOldChangesetID() { | protected function getOldChangesetID() { | ||||
return $this->oldChangesetID; | return $this->oldChangesetID; | ||||
} | } | ||||
public function setDocumentEngineBlocks( | |||||
PhabricatorDocumentEngineBlocks $blocks) { | |||||
$this->documentEngineBlocks = $blocks; | |||||
return $this; | |||||
} | |||||
public function getDocumentEngineBlocks() { | |||||
return $this->documentEngineBlocks; | |||||
} | |||||
public function setNewComments(array $new_comments) { | public function setNewComments(array $new_comments) { | ||||
foreach ($new_comments as $line_number => $comments) { | foreach ($new_comments as $line_number => $comments) { | ||||
assert_instances_of($comments, 'PhabricatorInlineCommentInterface'); | assert_instances_of($comments, 'PhabricatorInlineCommentInterface'); | ||||
} | } | ||||
$this->newComments = $new_comments; | $this->newComments = $new_comments; | ||||
return $this; | return $this; | ||||
} | } | ||||
protected function getNewComments() { | protected function getNewComments() { | ||||
▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | final public function renderChangesetTable($content) { | ||||
$props = null; | $props = null; | ||||
if ($this->shouldRenderPropertyChangeHeader()) { | if ($this->shouldRenderPropertyChangeHeader()) { | ||||
$props = $this->renderPropertyChangeHeader(); | $props = $this->renderPropertyChangeHeader(); | ||||
} | } | ||||
$notice = null; | $notice = null; | ||||
if ($this->getIsTopLevel()) { | if ($this->getIsTopLevel()) { | ||||
$force = (!$content && !$props); | $force = (!$content && !$props); | ||||
// If we have DocumentEngine messages about the blocks, assume they | |||||
// explain why there's no content. | |||||
$blocks = $this->getDocumentEngineBlocks(); | |||||
if ($blocks) { | |||||
if ($blocks->getMessages()) { | |||||
$force = false; | |||||
} | |||||
} | |||||
$notice = $this->renderChangeTypeHeader($force); | $notice = $this->renderChangeTypeHeader($force); | ||||
} | } | ||||
$undershield = null; | $undershield = null; | ||||
if ($this->getIsUndershield()) { | if ($this->getIsUndershield()) { | ||||
$undershield = $this->renderUndershieldHeader(); | $undershield = $this->renderUndershieldHeader(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 360 Lines • Show Last 20 Lines |