Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/differential/customfield/DifferentialPathField.php
12256 views
1
<?php
2
3
final class DifferentialPathField
4
extends DifferentialCustomField {
5
6
public function getFieldKey() {
7
return 'differential:path';
8
}
9
10
public function getFieldName() {
11
return pht('Path');
12
}
13
14
public function getFieldDescription() {
15
return pht('Shows the local path where the diff came from.');
16
}
17
18
public function shouldDisableByDefault() {
19
return true;
20
}
21
22
public function shouldAppearInPropertyView() {
23
return true;
24
}
25
26
public function renderPropertyViewValue(array $handles) {
27
return null;
28
}
29
30
public function shouldAppearInDiffPropertyView() {
31
return true;
32
}
33
34
public function renderDiffPropertyViewLabel(DifferentialDiff $diff) {
35
return $this->getFieldName();
36
}
37
38
public function renderDiffPropertyViewValue(DifferentialDiff $diff) {
39
$path = $diff->getSourcePath();
40
if (!$path) {
41
return null;
42
}
43
44
return $path;
45
}
46
47
}
48
49