mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-28 17:52:43 +01:00
6dd191a3c1
Summary: Ref T2222. Ref T3886. This is a little early for general use, but the message parse/generate stuff requires CustomFields and FieldSpecifications to be closely aligned, so this provides at least a plausbile approach for any installs that run into trouble. Test Plan: Viewed config; reordered fields. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2222, T3886 Differential Revision: https://secure.phabricator.com/D8450
38 lines
789 B
PHP
38 lines
789 B
PHP
<?php
|
|
|
|
final class DifferentialAuthorField
|
|
extends DifferentialCustomField {
|
|
|
|
public function getFieldKey() {
|
|
return 'differential:author';
|
|
}
|
|
|
|
public function getFieldName() {
|
|
return pht('Author');
|
|
}
|
|
|
|
public function getFieldDescription() {
|
|
return pht('Stores the revision author.');
|
|
}
|
|
|
|
public function canDisableField() {
|
|
return false;
|
|
}
|
|
|
|
public function shouldAppearInPropertyView() {
|
|
return true;
|
|
}
|
|
|
|
public function renderPropertyViewLabel() {
|
|
return $this->getFieldName();
|
|
}
|
|
|
|
public function getRequiredHandlePHIDsForPropertyView() {
|
|
return array($this->getObject()->getAuthorPHID());
|
|
}
|
|
|
|
public function renderPropertyViewValue(array $handles) {
|
|
return $handles[$this->getObject()->getAuthorPHID()]->renderLink();
|
|
}
|
|
|
|
}
|