Changeset View
Changeset View
Standalone View
Standalone View
src/applications/audit/view/PhabricatorAuditTransactionView.php
| <?php | <?php | ||||
| final class PhabricatorAuditTransactionView | final class PhabricatorAuditTransactionView | ||||
| extends PhabricatorApplicationTransactionView { | extends PhabricatorApplicationTransactionView { | ||||
| private $pathMap; | private $pathMap = array(); | ||||
| public function setPathMap(array $path_map) { | public function setPathMap(array $path_map) { | ||||
| $this->pathMap = $path_map; | $this->pathMap = $path_map; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getPathMap() { | public function getPathMap() { | ||||
| return $this->pathMap; | return $this->pathMap; | ||||
| Show All 35 Lines | final class PhabricatorAuditTransactionView | ||||
| protected function renderTransactionContent( | protected function renderTransactionContent( | ||||
| PhabricatorApplicationTransaction $xaction) { | PhabricatorApplicationTransaction $xaction) { | ||||
| $out = array(); | $out = array(); | ||||
| $type_inline = PhabricatorAuditActionConstants::INLINE; | $type_inline = PhabricatorAuditActionConstants::INLINE; | ||||
| $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 ($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 PhabricatorAuditActionConstants::INLINE: | case PhabricatorAuditActionConstants::INLINE: | ||||
| ▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines | |||||