1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-16 03:42:41 +01:00
phorge-phorge/src/applications/differential/field/specification/DifferentialAuthorFieldSpecification.php

45 lines
1 KiB
PHP
Raw Normal View History

<?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() {
return $this->renderUserList(array($this->getAuthorPHID()));
}
private function getAuthorPHID() {
$revision = $this->getRevision();
return $revision->getAuthorPHID();
}
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());
}
}