Differential D14665 Diff 35488 src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php
| Show All 17 Lines | class PhabricatorApplicationTransactionCommentView extends AphrontView { | ||||
| private $requestURI; | private $requestURI; | ||||
| private $showPreview = true; | private $showPreview = true; | ||||
| private $objectPHID; | private $objectPHID; | ||||
| private $headerText; | private $headerText; | ||||
| private $currentVersion; | private $currentVersion; | ||||
| private $versionedDraft; | private $versionedDraft; | ||||
| private $editTypes; | private $editTypes; | ||||
| private $transactionTimeline; | |||||
| public function setObjectPHID($object_phid) { | public function setObjectPHID($object_phid) { | ||||
| $this->objectPHID = $object_phid; | $this->objectPHID = $object_phid; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getObjectPHID() { | public function getObjectPHID() { | ||||
| return $this->objectPHID; | return $this->objectPHID; | ||||
| ▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | public function setEditTypes($edit_types) { | ||||
| $this->editTypes = $edit_types; | $this->editTypes = $edit_types; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getEditTypes() { | public function getEditTypes() { | ||||
| return $this->editTypes; | return $this->editTypes; | ||||
| } | } | ||||
| public function render() { | public function setTransactionTimeline( | ||||
| PhabricatorApplicationTransactionView $timeline) { | |||||
| $timeline->setQuoteTargetID($this->getCommentID()); | |||||
| $this->transactionTimeline = $timeline; | |||||
| return $this; | |||||
| } | |||||
| public function render() { | |||||
| $user = $this->getUser(); | $user = $this->getUser(); | ||||
| if (!$user->isLoggedIn()) { | if (!$user->isLoggedIn()) { | ||||
| $uri = id(new PhutilURI('/login/')) | $uri = id(new PhutilURI('/login/')) | ||||
| ->setQueryParam('next', (string)$this->getRequestURI()); | ->setQueryParam('next', (string)$this->getRequestURI()); | ||||
| return id(new PHUIObjectBoxView()) | return id(new PHUIObjectBoxView()) | ||||
| ->setFlush(true) | ->setFlush(true) | ||||
| ->setHeaderText(pht('Add Comment')) | ->setHeaderText(pht('Add Comment')) | ||||
| ->appendChild( | ->appendChild( | ||||
| ▲ Show 20 Lines • Show All 217 Lines • Show Last 20 Lines | |||||