Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/countdown/xaction/PhabricatorCountdownDescriptionTransaction.php
12256 views
1
<?php
2
3
final class PhabricatorCountdownDescriptionTransaction
4
extends PhabricatorCountdownTransactionType {
5
6
const TRANSACTIONTYPE = 'countdown:description';
7
8
public function generateOldValue($object) {
9
return $object->getDescription();
10
}
11
12
public function applyInternalEffects($object, $value) {
13
$object->setDescription($value);
14
}
15
16
public function getTitle() {
17
return pht(
18
'%s updated the countdown description.',
19
$this->renderAuthor());
20
}
21
22
public function getTitleForFeed() {
23
return pht(
24
'%s updated the countdown description for %s.',
25
$this->renderAuthor(),
26
$this->renderObject());
27
}
28
29
public function hasChangeDetailView() {
30
return true;
31
}
32
33
public function getMailDiffSectionHeader() {
34
return pht('CHANGES TO COUNTDOWN DESCRIPTION');
35
}
36
37
public function newChangeDetailView() {
38
$viewer = $this->getViewer();
39
40
return id(new PhabricatorApplicationTransactionTextDiffDetailView())
41
->setViewer($viewer)
42
->setOldText($this->getOldValue())
43
->setNewText($this->getNewValue());
44
}
45
46
public function newRemarkupChanges() {
47
$changes = array();
48
49
$changes[] = $this->newRemarkupChange()
50
->setOldValue($this->getOldValue())
51
->setNewValue($this->getNewValue());
52
53
return $changes;
54
}
55
}
56
57