1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-12 00:26:13 +01:00
phorge-phorge/src/applications/differential/customfield/DifferentialHostField.php

48 lines
912 B
PHP
Raw Normal View History

<?php
final class DifferentialHostField
extends DifferentialCustomField {
public function getFieldKey() {
return 'differential:host';
}
public function getFieldName() {
return pht('Host');
}
public function getFieldDescription() {
return pht('Shows the local host where the diff came from.');
}
public function shouldDisableByDefault() {
return true;
}
public function shouldAppearInPropertyView() {
return true;
}
public function renderPropertyViewValue(array $handles) {
return null;
}
public function shouldAppearInDiffPropertyView() {
return true;
}
public function renderDiffPropertyViewLabel(DifferentialDiff $diff) {
return $this->getFieldName();
}
public function renderDiffPropertyViewValue(DifferentialDiff $diff) {
$host = $diff->getSourceMachine();
if (!$host) {
return null;
}
return $host;
}
}