Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / spaces / xaction / PhabricatorSpacesNamespaceArchiveTransaction.php
bloba1dedbd85f40530d282dd9b970478814ac38caab
1 <?php
3 final class PhabricatorSpacesNamespaceArchiveTransaction
4 extends PhabricatorSpacesNamespaceTransactionType {
6 const TRANSACTIONTYPE = 'spaces:archive';
8 public function generateOldValue($object) {
9 return $object->getIsArchived();
12 public function applyInternalEffects($object, $value) {
13 $object->setIsArchived((int)$value);
16 public function getTitle() {
17 $new = $this->getNewValue();
18 if ($new) {
19 return pht(
20 '%s archived this space.',
21 $this->renderAuthor());
22 } else {
23 return pht(
24 '%s activated this space.',
25 $this->renderAuthor());
29 public function getTitleForFeed() {
30 $new = $this->getNewValue();
31 if ($new) {
32 return pht(
33 '%s archived space %s.',
34 $this->renderAuthor(),
35 $this->renderObject());
36 } else {
37 return pht(
38 '%s activated space %s.',
39 $this->renderAuthor(),
40 $this->renderObject());
44 public function getIcon() {
45 $new = $this->getNewValue();
46 if ($new) {
47 return 'fa-ban';
48 } else {
49 return 'fa-check';
53 public function getColor() {
54 $new = $this->getNewValue();
55 if ($new) {
56 return 'indigo';