@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 48 lines 1.1 kB view raw
1<?php 2 3abstract class PhabricatorObjectRelationshipSource extends Phobject { 4 5 private $viewer; 6 private $selectedFilter; 7 8 final public function setViewer(PhabricatorUser $viewer) { 9 $this->viewer = $viewer; 10 return $this; 11 } 12 13 final public function getViewer() { 14 return $this->viewer; 15 } 16 17 abstract public function isEnabledForObject($object); 18 abstract public function getResultPHIDTypes(); 19 20 protected function getDefaultFilter() { 21 return 'created'; 22 } 23 24 final public function setSelectedFilter($selected_filter) { 25 $this->selectedFilter = $selected_filter; 26 return $this; 27 } 28 29 final public function getSelectedFilter() { 30 if ($this->selectedFilter === null) { 31 return $this->getDefaultFilter(); 32 } 33 34 return $this->selectedFilter; 35 } 36 37 public function getFilters() { 38 // TODO: These are hard-coded for now, and all of this will probably be 39 // rewritten when we move to ApplicationSearch. 40 return array( 41 'assigned' => pht('Assigned to Me'), 42 'created' => pht('Created By Me'), 43 'open' => pht('All Open Objects'), 44 'all' => pht('All Objects'), 45 ); 46 } 47 48}