Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialTransaction.php
| Show All 16 Lines | final class DifferentialTransaction | ||||
| const MAILTAG_UPDATED = 'differential-updated'; | const MAILTAG_UPDATED = 'differential-updated'; | ||||
| const MAILTAG_REVIEW_REQUEST = 'differential-review-request'; | const MAILTAG_REVIEW_REQUEST = 'differential-review-request'; | ||||
| const MAILTAG_OTHER = 'differential-other'; | const MAILTAG_OTHER = 'differential-other'; | ||||
| public function getBaseTransactionClass() { | public function getBaseTransactionClass() { | ||||
| return 'DifferentialRevisionTransactionType'; | return 'DifferentialRevisionTransactionType'; | ||||
| } | } | ||||
| protected function newFallbackModularTransactionType() { | |||||
| // TODO: This allows us to render modern strings for older transactions | |||||
| // without doing a migration. At some point, we should do a migration and | |||||
| // throw this away. | |||||
| $xaction_type = $this->getTransactionType(); | |||||
| if ($xaction_type == PhabricatorTransactions::TYPE_CUSTOMFIELD) { | |||||
| switch ($this->getMetadataValue('customfield:key')) { | |||||
| case 'differential:title': | |||||
| return new DifferentialRevisionTitleTransaction(); | |||||
| } | |||||
| } | |||||
| return parent::newFallbackModularTransactionType(); | |||||
| } | |||||
| public function setIsCommandeerSideEffect($is_side_effect) { | public function setIsCommandeerSideEffect($is_side_effect) { | ||||
| $this->isCommandeerSideEffect = $is_side_effect; | $this->isCommandeerSideEffect = $is_side_effect; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getIsCommandeerSideEffect() { | public function getIsCommandeerSideEffect() { | ||||
| return $this->isCommandeerSideEffect; | return $this->isCommandeerSideEffect; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 639 Lines • Show Last 20 Lines | |||||