Differential D11146 Diff 26769 src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | public function renderView() { | ||||
$view->setHref($handle->getURI()); | $view->setHref($handle->getURI()); | ||||
$view->setAppIconFromPHID($handle->getPHID()); | $view->setAppIconFromPHID($handle->getPHID()); | ||||
$xaction_phids = $this->getValue('transactionPHIDs'); | $xaction_phids = $this->getValue('transactionPHIDs'); | ||||
$xaction = $this->getPrimaryTransaction(); | $xaction = $this->getPrimaryTransaction(); | ||||
$xaction->setHandles($this->getHandles()); | $xaction->setHandles($this->getHandles()); | ||||
$view->setTitle($xaction->getTitleForFeed($this)); | $view->setTitle($xaction->getTitleForFeed()); | ||||
foreach ($xaction_phids as $xaction_phid) { | foreach ($xaction_phids as $xaction_phid) { | ||||
$secondary_xaction = $this->getObject($xaction_phid); | $secondary_xaction = $this->getObject($xaction_phid); | ||||
$secondary_xaction->setHandles($this->getHandles()); | $secondary_xaction->setHandles($this->getHandles()); | ||||
$body = $secondary_xaction->getBodyForFeed($this); | $body = $secondary_xaction->getBodyForFeed($this); | ||||
if (nonempty($body)) { | if (nonempty($body)) { | ||||
$view->appendChild($body); | $view->appendChild($body); | ||||
} | } | ||||
} | } | ||||
$view->setImage( | $view->setImage( | ||||
$this->getHandle($xaction->getAuthorPHID())->getImageURI()); | $this->getHandle($xaction->getAuthorPHID())->getImageURI()); | ||||
return $view; | return $view; | ||||
} | } | ||||
public function renderText() { | public function renderText() { | ||||
$xaction = $this->getPrimaryTransaction(); | $xaction = $this->getPrimaryTransaction(); | ||||
$old_target = $xaction->getRenderingTarget(); | $old_target = $xaction->getRenderingTarget(); | ||||
$new_target = PhabricatorApplicationTransaction::TARGET_TEXT; | $new_target = PhabricatorApplicationTransaction::TARGET_TEXT; | ||||
$xaction->setRenderingTarget($new_target); | $xaction->setRenderingTarget($new_target); | ||||
$xaction->setHandles($this->getHandles()); | $xaction->setHandles($this->getHandles()); | ||||
$text = $xaction->getTitleForFeed($this); | $text = $xaction->getTitleForFeed(); | ||||
$xaction->setRenderingTarget($old_target); | $xaction->setRenderingTarget($old_target); | ||||
return $text; | return $text; | ||||
} | } | ||||
public function renderAsTextForDoorkeeper( | public function renderAsTextForDoorkeeper( | ||||
DoorkeeperFeedStoryPublisher $publisher) { | DoorkeeperFeedStoryPublisher $publisher) { | ||||
$xactions = array(); | $xactions = array(); | ||||
Show All 12 Lines |