@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at recaptime-dev/main 60 lines 1.2 kB view raw
1<?php 2 3final class PhabricatorSpacesNamespaceArchiveTransaction 4 extends PhabricatorSpacesNamespaceTransactionType { 5 6 const TRANSACTIONTYPE = 'spaces:archive'; 7 8 public function generateOldValue($object) { 9 return $object->getIsArchived(); 10 } 11 12 public function applyInternalEffects($object, $value) { 13 $object->setIsArchived((int)$value); 14 } 15 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()); 26 } 27 } 28 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()); 41 } 42 } 43 44 public function getIcon() { 45 $new = $this->getNewValue(); 46 if ($new) { 47 return 'fa-ban'; 48 } else { 49 return 'fa-check'; 50 } 51 } 52 53 public function getColor() { 54 $new = $this->getNewValue(); 55 if ($new) { 56 return 'indigo'; 57 } 58 } 59 60}