@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.0 kB view raw
1<?php 2 3final class PhabricatorEditEngineDisableTransaction 4 extends PhabricatorEditEngineTransactionType { 5 6 const TRANSACTIONTYPE = 'editengine.config.disable'; 7 8 public function generateOldValue($object) { 9 return (int)$object->getIsDisabled(); 10 } 11 12 public function generateNewValue($object, $value) { 13 return (int)$value; 14 } 15 16 public function applyInternalEffects($object, $value) { 17 $object->setIsDisabled($value); 18 } 19 20 public function getTitle() { 21 $new = $this->getNewValue(); 22 if ($new) { 23 return pht( 24 '%s disabled this form.', 25 $this->renderAuthor()); 26 } else { 27 return pht( 28 '%s enabled this form.', 29 $this->renderAuthor()); 30 } 31 } 32 33 public function getColor() { 34 $new = $this->getNewValue(); 35 if ($new) { 36 return 'indigo'; 37 } else { 38 return 'green'; 39 } 40 } 41 42 public function getIcon() { 43 $new = $this->getNewValue(); 44 if ($new) { 45 return 'fa-ban'; 46 } else { 47 return 'fa-check'; 48 } 49 } 50 51}