Differential D18415 Diff 44259 src/applications/differential/xaction/DifferentialRevisionRequestReviewTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/xaction/DifferentialRevisionRequestReviewTransaction.php
| Show All 25 Lines | public function getActionName() { | ||||
| return pht('Requested Review'); | return pht('Requested Review'); | ||||
| } | } | ||||
| public function generateOldValue($object) { | public function generateOldValue($object) { | ||||
| return $object->isNeedsReview(); | return $object->isNeedsReview(); | ||||
| } | } | ||||
| public function applyInternalEffects($object, $value) { | public function applyInternalEffects($object, $value) { | ||||
| $status_review = ArcanistDifferentialRevisionStatus::NEEDS_REVIEW; | $status_review = DifferentialRevisionStatus::NEEDS_REVIEW; | ||||
| $object->setStatus($status_review); | $object->setModernRevisionStatus($status_review); | ||||
| } | } | ||||
| protected function validateAction($object, PhabricatorUser $viewer) { | protected function validateAction($object, PhabricatorUser $viewer) { | ||||
| if ($object->isNeedsReview()) { | if ($object->isNeedsReview()) { | ||||
| throw new Exception( | throw new Exception( | ||||
| pht( | pht( | ||||
| 'You can not request review of this revision because this '. | 'You can not request review of this revision because this '. | ||||
| 'revision is already under review and the action would have '. | 'revision is already under review and the action would have '. | ||||
| Show All 33 Lines | |||||