@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 69 lines 1.6 kB view raw
1<?php 2 3abstract class PhabricatorEditorExtension 4 extends Phobject { 5 6 private $viewer; 7 private $editor; 8 private $object; 9 10 final public function getExtensionKey() { 11 return $this->getPhobjectClassConstant('EXTENSIONKEY'); 12 } 13 14 final public function setEditor( 15 PhabricatorApplicationTransactionEditor $editor) { 16 $this->editor = $editor; 17 return $this; 18 } 19 20 final public function getEditor() { 21 return $this->editor; 22 } 23 24 final public function setViewer(PhabricatorUser $viewer) { 25 $this->viewer = $viewer; 26 return $this; 27 } 28 29 final public function getViewer() { 30 return $this->viewer; 31 } 32 33 final public function setObject( 34 PhabricatorApplicationTransactionInterface $object) { 35 $this->object = $object; 36 return $this; 37 } 38 39 final public static function getAllExtensions() { 40 return id(new PhutilClassMapQuery()) 41 ->setAncestorClass(self::class) 42 ->setUniqueMethod('getExtensionKey') 43 ->execute(); 44 } 45 46 abstract public function getExtensionName(); 47 48 public function supportsObject( 49 PhabricatorApplicationTransactionEditor $editor, 50 PhabricatorApplicationTransactionInterface $object) { 51 return true; 52 } 53 54 public function validateTransactions($object, array $xactions) { 55 return array(); 56 } 57 58 final protected function newTransactionError( 59 PhabricatorApplicationTransaction $xaction, 60 $title, 61 $message) { 62 return new PhabricatorApplicationTransactionValidationError( 63 $xaction->getTransactionType(), 64 $title, 65 $message, 66 $xaction); 67 } 68 69}