Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conpherence/view/ConpherenceTransactionView.php
| <?php | <?php | ||||
| /** | |||||
| * @group conpherence | |||||
| */ | |||||
| final class ConpherenceTransactionView extends AphrontView { | final class ConpherenceTransactionView extends AphrontView { | ||||
| private $conpherenceTransaction; | private $conpherenceTransaction; | ||||
| private $handles; | private $handles; | ||||
| private $markupEngine; | private $markupEngine; | ||||
| public function setMarkupEngine(PhabricatorMarkupEngine $markup_engine) { | public function setMarkupEngine(PhabricatorMarkupEngine $markup_engine) { | ||||
| $this->markupEngine = $markup_engine; | $this->markupEngine = $markup_engine; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setHandles(array $handles) { | public function setHandles(array $handles) { | ||||
| assert_instances_of($handles, 'PhabricatorObjectHandle'); | assert_instances_of($handles, 'PhabricatorObjectHandle'); | ||||
| $this->handles = $handles; | $this->handles = $handles; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getHandles() { | public function getHandles() { | ||||
| return $this->handles; | return $this->handles; | ||||
| } | } | ||||
| public function setConpherenceTransaction(ConpherenceTransaction $tx) { | public function setConpherenceTransaction(ConpherenceTransaction $tx) { | ||||
| $this->conpherenceTransaction = $tx; | $this->conpherenceTransaction = $tx; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| private function getConpherenceTransaction() { | private function getConpherenceTransaction() { | ||||
| return $this->conpherenceTransaction; | return $this->conpherenceTransaction; | ||||
| } | } | ||||
| public function render() { | public function render() { | ||||
| $user = $this->getUser(); | $user = $this->getUser(); | ||||
| $transaction = $this->getConpherenceTransaction(); | $transaction = $this->getConpherenceTransaction(); | ||||
| switch ($transaction->getTransactionType()) { | switch ($transaction->getTransactionType()) { | ||||
| ▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | $transaction_view->appendChild( | ||||
| 'div', | 'div', | ||||
| array( | array( | ||||
| 'class' => $content_class | 'class' => $content_class | ||||
| ), | ), | ||||
| $content)); | $content)); | ||||
| return $transaction_view->render(); | return $transaction_view->render(); | ||||
| } | } | ||||
| } | } | ||||