@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 51 lines 1.1 kB view raw
1<?php 2 3final class FundInitiativeStatusTransaction 4 extends FundInitiativeTransactionType { 5 6 const TRANSACTIONTYPE = 'fund:status'; 7 8 public function generateOldValue($object) { 9 return $object->getStatus(); 10 } 11 12 public function applyInternalEffects($object, $value) { 13 $object->setStatus($value); 14 } 15 16 public function getTitle() { 17 if ($this->getNewValue() == FundInitiative::STATUS_CLOSED) { 18 return pht( 19 '%s closed this initiative.', 20 $this->renderAuthor()); 21 } else { 22 return pht( 23 '%s reopened this initiative.', 24 $this->renderAuthor()); 25 } 26 } 27 28 public function getTitleForFeed() { 29 if ($this->getNewValue() == FundInitiative::STATUS_CLOSED) { 30 return pht( 31 '%s closed %s.', 32 $this->renderAuthor(), 33 $this->renderObject()); 34 } else { 35 return pht( 36 '%s reopened %s.', 37 $this->renderAuthor(), 38 $this->renderObject()); 39 } 40 } 41 42 public function getIcon() { 43 if ($this->getNewValue() == FundInitiative::STATUS_CLOSED) { 44 return 'fa-ban'; 45 } else { 46 return 'fa-check'; 47 } 48 } 49 50 51}