@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 72 lines 2.1 kB view raw
1<?php 2 3final class PhabricatorBadgesApplication extends PhabricatorApplication { 4 5 public function getName() { 6 return pht('Badges'); 7 } 8 9 public function getBaseURI() { 10 return '/badges/'; 11 } 12 13 public function getShortDescription() { 14 return pht('Achievements and Notoriety'); 15 } 16 17 public function getIcon() { 18 return 'fa-trophy'; 19 } 20 21 public function getFlavorText() { 22 return pht('Build self esteem through gamification.'); 23 } 24 25 public function getApplicationGroup() { 26 return self::GROUP_UTILITIES; 27 } 28 29 public function getRoutes() { 30 return array( 31 '/badges/' => array( 32 '(?:query/(?P<queryKey>[^/]+)/)?' 33 => 'PhabricatorBadgesListController', 34 'award/(?:(?P<id>\d+)/)?' 35 => 'PhabricatorBadgesAwardController', 36 'create/' 37 => 'PhabricatorBadgesEditController', 38 'comment/(?P<id>[1-9]\d*)/' 39 => 'PhabricatorBadgesCommentController', 40 $this->getEditRoutePattern('edit/') 41 => 'PhabricatorBadgesEditController', 42 'archive/(?:(?P<id>\d+)/)?' 43 => 'PhabricatorBadgesArchiveController', 44 'view/(?:(?P<id>\d+)/)?' 45 => 'PhabricatorBadgesViewController', 46 'recipients/' => array( 47 '(?P<id>[1-9]\d*)/' 48 => 'PhabricatorBadgesRecipientsController', 49 '(?P<id>[1-9]\d*)/add/' 50 => 'PhabricatorBadgesEditRecipientsController', 51 '(?P<id>[1-9]\d*)/remove/' 52 => 'PhabricatorBadgesRemoveRecipientsController', 53 ), 54 ), 55 ); 56 } 57 58 protected function getCustomCapabilities() { 59 return array( 60 PhabricatorBadgesCreateCapability::CAPABILITY => array( 61 'default' => PhabricatorPolicies::POLICY_ADMIN, 62 'caption' => pht('Default create policy for badges.'), 63 ), 64 PhabricatorBadgesDefaultEditCapability::CAPABILITY => array( 65 'default' => PhabricatorPolicies::POLICY_ADMIN, 66 'caption' => pht('Default edit policy for badges.'), 67 'template' => PhabricatorBadgesPHIDType::TYPECONST, 68 ), 69 ); 70 } 71 72}