2014-02-27 01:53:42 +01:00
|
|
|
<?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.');
|
|
|
|
}
|
|
|
|
|
2014-02-27 20:06:14 +01:00
|
|
|
public function shouldDisableByDefault() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2014-02-27 01:53:42 +01:00
|
|
|
public function shouldAppearInPropertyView() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function renderPropertyViewLabel() {
|
|
|
|
return $this->getFieldName();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function renderPropertyViewValue(array $handles) {
|
|
|
|
$host = $this->getObject()->getActiveDiff()->getSourceMachine();
|
|
|
|
if (!$host) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
return $host;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|