public function reduceProxyResponse() { if ($this->transactionView) { $view = $this->transactionView; } else { if ($this->getTransactions()) { $view = head($this->getTransactions())->getApplicationTransactionViewObject(); } else { $view = new PhabricatorApplicationTransactionView(); } } $view->setUser($this->getViewer())->setTransactions($this->getTransactions())->setIsPreview($this->isPreview); if ($this->isPreview) { $xactions = mpull($view->buildEvents(), 'render'); } else { $xactions = mpull($view->buildEvents(), 'render', 'getTransactionPHID'); } // Force whatever the underlying views built to render into HTML for // the Javascript. foreach ($xactions as $key => $xaction) { $xactions[$key] = hsprintf('%s', $xaction); } $content = array('xactions' => $xactions, 'spacer' => PHUITimelineView::renderSpacer()); return $this->getProxy()->setContent($content); }
public function reduceProxyResponse() { if ($this->transactionView) { $view = $this->transactionView; } else { if ($this->getTransactions()) { $view = head($this->getTransactions())->getApplicationTransactionViewObject(); } else { $view = new PhabricatorApplicationTransactionView(); } } $view->setUser($this->getViewer())->setTransactions($this->getTransactions())->setIsPreview($this->isPreview); if ($this->isPreview) { $xactions = mpull($view->buildEvents(), 'render'); } else { $xactions = mpull($view->buildEvents(), 'render', 'getTransactionPHID'); } $content = array('xactions' => $xactions, 'spacer' => PHUITimelineView::renderSpacer()); return $this->getProxy()->setContent($content); }