Differential D19810 Diff 47322 src/applications/differential/xaction/DifferentialRevisionActionTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/xaction/DifferentialRevisionActionTransaction.php
| Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | protected function getRevisionActionGroupKey() { | ||||
| return DifferentialRevisionEditEngine::ACTIONGROUP_REVISION; | return DifferentialRevisionEditEngine::ACTIONGROUP_REVISION; | ||||
| } | } | ||||
| protected function getRevisionActionDescription( | protected function getRevisionActionDescription( | ||||
| DifferentialRevision $revision) { | DifferentialRevision $revision) { | ||||
| return null; | return null; | ||||
| } | } | ||||
| protected function getRevisionActionSubmitButtonText( | |||||
| DifferentialRevision $revision) { | |||||
| return null; | |||||
| } | |||||
| public static function loadAllActions() { | public static function loadAllActions() { | ||||
| return id(new PhutilClassMapQuery()) | return id(new PhutilClassMapQuery()) | ||||
| ->setAncestorClass(__CLASS__) | ->setAncestorClass(__CLASS__) | ||||
| ->setUniqueMethod('getRevisionActionKey') | ->setUniqueMethod('getRevisionActionKey') | ||||
| ->execute(); | ->execute(); | ||||
| } | } | ||||
| protected function isViewerRevisionAuthor( | protected function isViewerRevisionAuthor( | ||||
| Show All 37 Lines | if ($this->isActionAvailable($revision, $viewer)) { | ||||
| $field->setCommentActionLabel($label); | $field->setCommentActionLabel($label); | ||||
| $description = $this->getRevisionActionDescription($revision); | $description = $this->getRevisionActionDescription($revision); | ||||
| $field->setActionDescription($description); | $field->setActionDescription($description); | ||||
| $group_key = $this->getRevisionActionGroupKey(); | $group_key = $this->getRevisionActionGroupKey(); | ||||
| $field->setCommentActionGroupKey($group_key); | $field->setCommentActionGroupKey($group_key); | ||||
| $button_text = $this->getRevisionActionSubmitButtonText($revision); | |||||
| $field->setActionSubmitButtonText($button_text); | |||||
| // Currently, every revision action conflicts with every other | // Currently, every revision action conflicts with every other | ||||
| // revision action: for example, you can not simultaneously Accept and | // revision action: for example, you can not simultaneously Accept and | ||||
| // Reject a revision. | // Reject a revision. | ||||
| // Under some configurations, some combinations of actions are sort of | // Under some configurations, some combinations of actions are sort of | ||||
| // technically permissible. For example, you could reasonably Reject | // technically permissible. For example, you could reasonably Reject | ||||
| // and Abandon a revision if "anyone can abandon anything" is enabled. | // and Abandon a revision if "anyone can abandon anything" is enabled. | ||||
| ▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines | |||||