Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/view/DifferentialTransactionView.php
| <?php | <?php | ||||
| final class DifferentialTransactionView | final class DifferentialTransactionView | ||||
| extends PhabricatorApplicationTransactionView { | extends PhabricatorApplicationTransactionView { | ||||
| private $changesets; | private $changesets = array(); | ||||
| private $revision; | private $revision; | ||||
| private $rightDiff; | private $rightDiff; | ||||
| private $leftDiff; | private $leftDiff; | ||||
| public function setLeftDiff(DifferentialDiff $left_diff) { | public function setLeftDiff(DifferentialDiff $left_diff) { | ||||
| $this->leftDiff = $left_diff; | $this->leftDiff = $left_diff; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | protected function renderTransactionContent( | ||||
| $group = $xaction->getTransactionGroup(); | $group = $xaction->getTransactionGroup(); | ||||
| if ($xaction->getTransactionType() == $type_inline) { | if ($xaction->getTransactionType() == $type_inline) { | ||||
| array_unshift($group, $xaction); | array_unshift($group, $xaction); | ||||
| } else { | } else { | ||||
| $out[] = parent::renderTransactionContent($xaction); | $out[] = parent::renderTransactionContent($xaction); | ||||
| } | } | ||||
| // If we're rendering a preview, we show the inline comments in a separate | |||||
| // section underneath the main transaction preview, so we skip rendering | |||||
| // them in the preview body. | |||||
| if ($this->getIsPreview()) { | |||||
| return $out; | |||||
| } | |||||
| if (!$group) { | if (!$group) { | ||||
| return $out; | return $out; | ||||
| } | } | ||||
| $inlines = array(); | $inlines = array(); | ||||
| foreach ($group as $xaction) { | foreach ($group as $xaction) { | ||||
| switch ($xaction->getTransactionType()) { | switch ($xaction->getTransactionType()) { | ||||
| case DifferentialTransaction::TYPE_INLINE: | case DifferentialTransaction::TYPE_INLINE: | ||||
| ▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines | |||||