Differential D21401 Diff 50944 src/applications/differential/xaction/DifferentialRevisionRequestReviewTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/xaction/DifferentialRevisionRequestReviewTransaction.php
| <?php | <?php | ||||
| final class DifferentialRevisionRequestReviewTransaction | final class DifferentialRevisionRequestReviewTransaction | ||||
| extends DifferentialRevisionActionTransaction { | extends DifferentialRevisionActionTransaction { | ||||
| const TRANSACTIONTYPE = 'differential.revision.request'; | const TRANSACTIONTYPE = 'differential.revision.request'; | ||||
| const ACTIONKEY = 'request-review'; | const ACTIONKEY = 'request-review'; | ||||
| protected function getRevisionActionLabel() { | protected function getRevisionActionLabel( | ||||
| DifferentialRevision $revision, | |||||
| PhabricatorUser $viewer) { | |||||
| return pht('Request Review'); | return pht('Request Review'); | ||||
| } | } | ||||
| protected function getRevisionActionDescription( | protected function getRevisionActionDescription( | ||||
| DifferentialRevision $revision) { | DifferentialRevision $revision, | ||||
| PhabricatorUser $viewer) { | |||||
| if ($revision->isDraft()) { | if ($revision->isDraft()) { | ||||
| return pht('This revision will be submitted to reviewers for feedback.'); | return pht('This revision will be submitted to reviewers for feedback.'); | ||||
| } else { | } else { | ||||
| return pht('This revision will be returned to reviewers for feedback.'); | return pht('This revision will be returned to reviewers for feedback.'); | ||||
| } | } | ||||
| } | } | ||||
| protected function getRevisionActionSubmitButtonText( | protected function getRevisionActionSubmitButtonText( | ||||
| DifferentialRevision $revision) { | DifferentialRevision $revision, | ||||
| PhabricatorUser $viewer) { | |||||
| // See PHI975. When the action stack will promote the revision out of | // See PHI975. When the action stack will promote the revision out of | ||||
| // draft, change the button text from "Submit Quietly". | // draft, change the button text from "Submit Quietly". | ||||
| if ($revision->isDraft()) { | if ($revision->isDraft()) { | ||||
| return pht('Publish Revision'); | return pht('Publish Revision'); | ||||
| } | } | ||||
| return null; | return null; | ||||
| ▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines | |||||