Differential D17066 Diff 41082 src/applications/differential/field/DifferentialAuditorsCommitMessageField.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/field/DifferentialAuditorsCommitMessageField.php
| <?php | <?php | ||||
| final class DifferentialAuditorsCommitMessageField | final class DifferentialAuditorsCommitMessageField | ||||
| extends DifferentialCommitMessageField { | extends DifferentialCommitMessageCustomField { | ||||
| const FIELDKEY = 'phabricator:auditors'; | const FIELDKEY = 'phabricator:auditors'; | ||||
| public function getFieldName() { | public function getFieldName() { | ||||
| return pht('Auditors'); | return pht('Auditors'); | ||||
| } | } | ||||
| public function parseFieldValue($value) { | public function parseFieldValue($value) { | ||||
| return $this->parseObjectList( | return $this->parseObjectList( | ||||
| $value, | $value, | ||||
| array( | array( | ||||
| PhabricatorPeopleUserPHIDType::TYPECONST, | PhabricatorPeopleUserPHIDType::TYPECONST, | ||||
| PhabricatorProjectProjectPHIDType::TYPECONST, | PhabricatorProjectProjectPHIDType::TYPECONST, | ||||
| )); | )); | ||||
| } | } | ||||
| public function getCustomFieldKey() { | |||||
| return 'phabricator:auditors'; | |||||
| } | |||||
| 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()); | |||||
| } | |||||
| } | } | ||||