2016-12-14 17:14:52 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class DifferentialSubscribersCommitMessageField
|
|
|
|
extends DifferentialCommitMessageField {
|
|
|
|
|
|
|
|
const FIELDKEY = 'ccPHIDs';
|
|
|
|
|
|
|
|
public function getFieldName() {
|
|
|
|
return pht('Subscribers');
|
|
|
|
}
|
|
|
|
|
2016-12-15 19:11:58 +01:00
|
|
|
public function getFieldOrder() {
|
|
|
|
return 6000;
|
|
|
|
}
|
|
|
|
|
2016-12-14 17:14:52 +01:00
|
|
|
public function getFieldAliases() {
|
|
|
|
return array(
|
|
|
|
'CC',
|
|
|
|
'CCs',
|
|
|
|
'Subscriber',
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function parseFieldValue($value) {
|
|
|
|
return $this->parseObjectList(
|
|
|
|
$value,
|
|
|
|
array(
|
|
|
|
PhabricatorPeopleUserPHIDType::TYPECONST,
|
|
|
|
PhabricatorProjectProjectPHIDType::TYPECONST,
|
|
|
|
PhabricatorOwnersPackagePHIDType::TYPECONST,
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
2016-12-15 19:11:58 +01:00
|
|
|
public function readFieldValueFromObject(DifferentialRevision $revision) {
|
|
|
|
if (!$revision->getPHID()) {
|
|
|
|
return array();
|
|
|
|
}
|
|
|
|
|
|
|
|
return PhabricatorSubscribersQuery::loadSubscribersForPHID(
|
|
|
|
$revision->getPHID());
|
|
|
|
}
|
|
|
|
|
|
|
|
public function readFieldValueFromConduit($value) {
|
|
|
|
return $this->readStringListFieldValueFromConduit($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function renderFieldValue($value) {
|
|
|
|
return $this->renderHandleList($value);
|
|
|
|
}
|
|
|
|
|
2016-12-14 17:14:52 +01:00
|
|
|
}
|