Differential D11355 Diff 27283 src/applications/transactions/view/PhabricatorApplicationTransactionView.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/view/PhabricatorApplicationTransactionView.php
Show All 10 Lines | class PhabricatorApplicationTransactionView extends AphrontView { | ||||
private $isPreview; | private $isPreview; | ||||
private $objectPHID; | private $objectPHID; | ||||
private $shouldTerminate = false; | private $shouldTerminate = false; | ||||
private $quoteTargetID; | private $quoteTargetID; | ||||
private $quoteRef; | private $quoteRef; | ||||
private $pager; | private $pager; | ||||
private $renderAsFeed; | private $renderAsFeed; | ||||
private $renderData = array(); | private $renderData = array(); | ||||
private $hideCommentOptions = false; | |||||
public function setRenderAsFeed($feed) { | public function setRenderAsFeed($feed) { | ||||
$this->renderAsFeed = $feed; | $this->renderAsFeed = $feed; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function setQuoteRef($quote_ref) { | public function setQuoteRef($quote_ref) { | ||||
$this->quoteRef = $quote_ref; | $this->quoteRef = $quote_ref; | ||||
▲ Show 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | public function setRenderData(array $data) { | ||||
$this->renderData = $data; | $this->renderData = $data; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getRenderData() { | public function getRenderData() { | ||||
return $this->renderData; | return $this->renderData; | ||||
} | } | ||||
public function setHideCommentOptions($hide_comment_options) { | |||||
$this->hideCommentOptions = $hide_comment_options; | |||||
return $this; | |||||
} | |||||
public function getHideCommentOptions() { | |||||
return $this->hideCommentOptions; | |||||
} | |||||
public function buildEvents($with_hiding = false) { | public function buildEvents($with_hiding = false) { | ||||
$user = $this->getUser(); | $user = $this->getUser(); | ||||
$xactions = $this->transactions; | $xactions = $this->transactions; | ||||
$xactions = $this->filterHiddenTransactions($xactions); | $xactions = $this->filterHiddenTransactions($xactions); | ||||
$xactions = $this->groupRelatedTransactions($xactions); | $xactions = $this->groupRelatedTransactions($xactions); | ||||
$groups = $this->groupDisplayTransactions($xactions); | $groups = $this->groupDisplayTransactions($xactions); | ||||
▲ Show 20 Lines • Show All 265 Lines • ▼ Show 20 Lines | private function renderEvent( | ||||
array $group) { | array $group) { | ||||
$viewer = $this->getUser(); | $viewer = $this->getUser(); | ||||
$event = id(new PHUITimelineEventView()) | $event = id(new PHUITimelineEventView()) | ||||
->setUser($viewer) | ->setUser($viewer) | ||||
->setTransactionPHID($xaction->getPHID()) | ->setTransactionPHID($xaction->getPHID()) | ||||
->setUserHandle($xaction->getHandle($xaction->getAuthorPHID())) | ->setUserHandle($xaction->getHandle($xaction->getAuthorPHID())) | ||||
->setIcon($xaction->getIcon()) | ->setIcon($xaction->getIcon()) | ||||
->setColor($xaction->getColor()); | ->setColor($xaction->getColor()) | ||||
->setHideCommentOptions($this->getHideCommentOptions()); | |||||
list($token, $token_removed) = $xaction->getToken(); | list($token, $token_removed) = $xaction->getToken(); | ||||
if ($token) { | if ($token) { | ||||
$event->setToken($token, $token_removed); | $event->setToken($token, $token_removed); | ||||
} | } | ||||
if (!$this->shouldSuppressTitle($xaction, $group)) { | if (!$this->shouldSuppressTitle($xaction, $group)) { | ||||
if ($this->renderAsFeed) { | if ($this->renderAsFeed) { | ||||
▲ Show 20 Lines • Show All 112 Lines • Show Last 20 Lines |