Path: blob/master/src/applications/differential/field/DifferentialReviewedByCommitMessageField.php
12256 views
<?php12final class DifferentialReviewedByCommitMessageField3extends DifferentialCommitMessageField {45const FIELDKEY = 'reviewedByPHIDs';67public function getFieldName() {8return pht('Reviewed By');9}1011public function getFieldOrder() {12return 5000;13}1415public function parseFieldValue($value) {16return $this->parseObjectList(17$value,18array(19PhabricatorPeopleUserPHIDType::TYPECONST,20PhabricatorProjectProjectPHIDType::TYPECONST,21),22$allow_partial = true);23}2425public function isFieldEditable() {26return false;27}2829public function isTemplateField() {30return false;31}3233public function readFieldValueFromObject(DifferentialRevision $revision) {34if (!$revision->getPHID()) {35return array();36}3738$phids = array();39foreach ($revision->getReviewers() as $reviewer) {40switch ($reviewer->getReviewerStatus()) {41case DifferentialReviewerStatus::STATUS_ACCEPTED:42$phids[] = $reviewer->getReviewerPHID();43break;44}45}4647return $phids;48}4950public function readFieldValueFromConduit($value) {51return $this->readStringListFieldValueFromConduit($value);52}5354public function renderFieldValue($value) {55return $this->renderHandleList($value);56}5758}596061