2011-08-14 21:33:54 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class DifferentialAuthorFieldSpecification
|
|
|
|
extends DifferentialFieldSpecification {
|
|
|
|
|
|
|
|
public function shouldAppearOnRevisionView() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getRequiredHandlePHIDsForRevisionView() {
|
|
|
|
return array($this->getAuthorPHID());
|
|
|
|
}
|
|
|
|
|
|
|
|
public function renderLabelForRevisionView() {
|
|
|
|
return 'Author:';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function renderValueForRevisionView() {
|
2012-05-16 23:38:16 +02:00
|
|
|
return $this->renderUserList(array($this->getAuthorPHID()));
|
2011-08-14 21:33:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
private function getAuthorPHID() {
|
|
|
|
$revision = $this->getRevision();
|
|
|
|
return $revision->getAuthorPHID();
|
|
|
|
}
|
|
|
|
|
2012-02-20 14:38:21 +01:00
|
|
|
public function shouldAppearOnRevisionList() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function renderHeaderForRevisionList() {
|
|
|
|
return 'Author';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function renderValueForRevisionList(DifferentialRevision $revision) {
|
|
|
|
return $this->getHandle($revision->getAuthorPHID())->renderLink();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getRequiredHandlePHIDsForRevisionList(
|
|
|
|
DifferentialRevision $revision) {
|
|
|
|
return array($revision->getAuthorPHID());
|
|
|
|
}
|
|
|
|
|
2011-08-14 21:33:54 +02:00
|
|
|
}
|