Differential D17120 Diff 41177 src/applications/differential/editor/DifferentialTransactionEditor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/editor/DifferentialTransactionEditor.php
| Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | final class DifferentialTransactionEditor | ||||
| } | } | ||||
| public function getTransactionTypes() { | public function getTransactionTypes() { | ||||
| $types = parent::getTransactionTypes(); | $types = parent::getTransactionTypes(); | ||||
| $types[] = PhabricatorTransactions::TYPE_COMMENT; | $types[] = PhabricatorTransactions::TYPE_COMMENT; | ||||
| $types[] = PhabricatorTransactions::TYPE_VIEW_POLICY; | $types[] = PhabricatorTransactions::TYPE_VIEW_POLICY; | ||||
| $types[] = PhabricatorTransactions::TYPE_EDIT_POLICY; | $types[] = PhabricatorTransactions::TYPE_EDIT_POLICY; | ||||
| $types[] = PhabricatorTransactions::TYPE_INLINESTATE; | |||||
| $types[] = DifferentialTransaction::TYPE_ACTION; | $types[] = DifferentialTransaction::TYPE_ACTION; | ||||
| $types[] = DifferentialTransaction::TYPE_INLINE; | $types[] = DifferentialTransaction::TYPE_INLINE; | ||||
| $types[] = DifferentialTransaction::TYPE_STATUS; | $types[] = DifferentialTransaction::TYPE_STATUS; | ||||
| $types[] = DifferentialTransaction::TYPE_UPDATE; | $types[] = DifferentialTransaction::TYPE_UPDATE; | ||||
| return $types; | return $types; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 182 Lines • ▼ Show 20 Lines | switch ($xaction->getTransactionType()) { | ||||
| $xaction->getNewValue())); | $xaction->getNewValue())); | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| return parent::applyCustomInternalTransaction($object, $xaction); | return parent::applyCustomInternalTransaction($object, $xaction); | ||||
| } | } | ||||
| protected function expandTransactions( | |||||
| PhabricatorLiskDAO $object, | |||||
| array $xactions) { | |||||
| // If we have an "Inline State" transaction already, the caller built it | |||||
| // for us so we don't need to expand it again. | |||||
| foreach ($xactions as $xaction) { | |||||
| switch ($xaction->getTransactionType()) { | |||||
| case PhabricatorTransactions::TYPE_INLINESTATE: | |||||
| $this->didExpandInlineState = true; | |||||
| break; | |||||
| } | |||||
| } | |||||
| return parent::expandTransactions($object, $xactions); | |||||
| } | |||||
| protected function expandTransaction( | protected function expandTransaction( | ||||
| PhabricatorLiskDAO $object, | PhabricatorLiskDAO $object, | ||||
| PhabricatorApplicationTransaction $xaction) { | PhabricatorApplicationTransaction $xaction) { | ||||
| $results = parent::expandTransaction($object, $xaction); | $results = parent::expandTransaction($object, $xaction); | ||||
| $actor = $this->getActor(); | $actor = $this->getActor(); | ||||
| $actor_phid = $this->getActingAsPHID(); | $actor_phid = $this->getActingAsPHID(); | ||||
| ▲ Show 20 Lines • Show All 1,679 Lines • Show Last 20 Lines | |||||