Differential D17106 Diff 41165 src/applications/differential/editor/DifferentialRevisionEditEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/editor/DifferentialRevisionEditEngine.php
| Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | final class DifferentialRevisionEditEngine | ||||
| protected function getObjectName() { | protected function getObjectName() { | ||||
| return pht('Revision'); | return pht('Revision'); | ||||
| } | } | ||||
| protected function getObjectViewURI($object) { | protected function getObjectViewURI($object) { | ||||
| return $object->getURI(); | return $object->getURI(); | ||||
| } | } | ||||
| protected function getEditorURI() { | |||||
| return $this->getApplication()->getApplicationURI('revision/edit/'); | |||||
| } | |||||
| public function setDiff(DifferentialDiff $diff) { | public function setDiff(DifferentialDiff $diff) { | ||||
| $this->diff = $diff; | $this->diff = $diff; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getDiff() { | public function getDiff() { | ||||
| return $this->diff; | return $this->diff; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | protected function buildCustomEditFields($object) { | ||||
| $fields[] = id(new PhabricatorDatasourceEditField()) | $fields[] = id(new PhabricatorDatasourceEditField()) | ||||
| ->setKey(DifferentialRevisionReviewersTransaction::EDITKEY) | ->setKey(DifferentialRevisionReviewersTransaction::EDITKEY) | ||||
| ->setLabel(pht('Reviewers')) | ->setLabel(pht('Reviewers')) | ||||
| ->setDatasource(new DifferentialReviewerDatasource()) | ->setDatasource(new DifferentialReviewerDatasource()) | ||||
| ->setUseEdgeTransactions(true) | ->setUseEdgeTransactions(true) | ||||
| ->setTransactionType( | ->setTransactionType( | ||||
| DifferentialRevisionReviewersTransaction::TRANSACTIONTYPE) | DifferentialRevisionReviewersTransaction::TRANSACTIONTYPE) | ||||
| ->setCommentActionLabel(pht('Edit Reviewers')) | |||||
| ->setDescription(pht('Reviewers for this revision.')) | ->setDescription(pht('Reviewers for this revision.')) | ||||
| ->setConduitDescription(pht('Change the reviewers for this revision.')) | ->setConduitDescription(pht('Change the reviewers for this revision.')) | ||||
| ->setConduitTypeDescription(pht('New reviewers.')) | ->setConduitTypeDescription(pht('New reviewers.')) | ||||
| ->setValue($object->getReviewerPHIDsForEdit()); | ->setValue($object->getReviewerPHIDsForEdit()); | ||||
| $fields[] = id(new PhabricatorDatasourceEditField()) | $fields[] = id(new PhabricatorDatasourceEditField()) | ||||
| ->setKey('repositoryPHID') | ->setKey('repositoryPHID') | ||||
| ->setLabel(pht('Repository')) | ->setLabel(pht('Repository')) | ||||
| Show All 36 Lines | |||||