Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/differential/xaction/DifferentialRevisionWrongStateTransaction.php
12256 views
1
<?php
2
3
final class DifferentialRevisionWrongStateTransaction
4
extends DifferentialRevisionTransactionType {
5
6
const TRANSACTIONTYPE = 'differential.revision.wrong';
7
8
public function generateOldValue($object) {
9
return null;
10
}
11
12
public function generateNewValue($object, $value) {
13
return $value;
14
}
15
16
public function getIcon() {
17
return 'fa-exclamation';
18
}
19
20
public function getColor() {
21
return 'pink';
22
}
23
24
public function getActionStrength() {
25
return 400;
26
}
27
28
public function getTitle() {
29
$new_value = $this->getNewValue();
30
31
$status = DifferentialRevisionStatus::newForStatus($new_value);
32
33
return pht(
34
'This revision was not accepted when it landed; it landed in state %s.',
35
$this->renderValue($status->getDisplayName()));
36
}
37
38
public function shouldHideForFeed() {
39
return true;
40
}
41
42
}
43
44