Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialRevision.php
| Show First 20 Lines • Show All 403 Lines • ▼ Show 20 Lines | /* -( PhabricatorTokenReceiverInterface )---------------------------------- */ | ||||
| public function attachReviewerStatus(array $reviewers) { | public function attachReviewerStatus(array $reviewers) { | ||||
| assert_instances_of($reviewers, 'DifferentialReviewerProxy'); | assert_instances_of($reviewers, 'DifferentialReviewerProxy'); | ||||
| $this->reviewerStatus = $reviewers; | $this->reviewerStatus = $reviewers; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getReviewerPHIDsForEdit() { | |||||
| $reviewers = $this->getReviewerStatus(); | |||||
| $status_blocking = DifferentialReviewerStatus::STATUS_BLOCKING; | |||||
| $value = array(); | |||||
| foreach ($reviewers as $reviewer) { | |||||
| $phid = $reviewer->getReviewerPHID(); | |||||
| if ($reviewer->getStatus() == $status_blocking) { | |||||
| $value[] = 'blocking('.$phid.')'; | |||||
| } else { | |||||
| $value[] = $phid; | |||||
| } | |||||
| } | |||||
| return $value; | |||||
| } | |||||
| public function getRepository() { | public function getRepository() { | ||||
| return $this->assertAttached($this->repository); | return $this->assertAttached($this->repository); | ||||
| } | } | ||||
| public function attachRepository(PhabricatorRepository $repository = null) { | public function attachRepository(PhabricatorRepository $repository = null) { | ||||
| $this->repository = $repository; | $this->repository = $repository; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 285 Lines • Show Last 20 Lines | |||||