2016-12-14 08:14:52 -08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class DifferentialAuditorsCommitMessageField
|
2016-12-15 10:11:58 -08:00
|
|
|
extends DifferentialCommitMessageCustomField {
|
2016-12-14 08:14:52 -08:00
|
|
|
|
|
|
|
const FIELDKEY = 'phabricator:auditors';
|
|
|
|
|
|
|
|
public function getFieldName() {
|
|
|
|
return pht('Auditors');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function parseFieldValue($value) {
|
|
|
|
return $this->parseObjectList(
|
|
|
|
$value,
|
|
|
|
array(
|
|
|
|
PhabricatorPeopleUserPHIDType::TYPECONST,
|
|
|
|
PhabricatorProjectProjectPHIDType::TYPECONST,
|
2017-01-30 09:51:21 -08:00
|
|
|
PhabricatorOwnersPackagePHIDType::TYPECONST,
|
2016-12-14 08:14:52 -08:00
|
|
|
));
|
|
|
|
}
|
|
|
|
|
2016-12-15 10:11:58 -08:00
|
|
|
public function getCustomFieldKey() {
|
|
|
|
return 'phabricator:auditors';
|
|
|
|
}
|
|
|
|
|
2016-12-16 06:28:26 -08:00
|
|
|
public function isFieldEditable() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function isTemplateField() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-12-15 10:11:58 -08:00
|
|
|
public function readFieldValueFromConduit($value) {
|
|
|
|
return $this->readStringListFieldValueFromConduit($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function renderFieldValue($value) {
|
|
|
|
return $this->renderHandleList($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function readFieldValueFromCustomFieldStorage($value) {
|
|
|
|
return $this->readJSONFieldValueFromCustomFieldStorage($value, array());
|
|
|
|
}
|
|
|
|
|
2016-12-14 08:14:52 -08:00
|
|
|
}
|