Path: blob/master/src/applications/badges/application/PhabricatorBadgesApplication.php
12256 views
<?php12final class PhabricatorBadgesApplication extends PhabricatorApplication {34public function getName() {5return pht('Badges');6}78public function getBaseURI() {9return '/badges/';10}1112public function getShortDescription() {13return pht('Achievements and Notoriety');14}1516public function getIcon() {17return 'fa-trophy';18}1920public function getFlavorText() {21return pht('Build self esteem through gamification.');22}2324public function getApplicationGroup() {25return self::GROUP_UTILITIES;26}2728public function getRoutes() {29return array(30'/badges/' => array(31'(?:query/(?P<queryKey>[^/]+)/)?'32=> 'PhabricatorBadgesListController',33'award/(?:(?P<id>\d+)/)?'34=> 'PhabricatorBadgesAwardController',35'create/'36=> 'PhabricatorBadgesEditController',37'comment/(?P<id>[1-9]\d*)/'38=> 'PhabricatorBadgesCommentController',39$this->getEditRoutePattern('edit/')40=> 'PhabricatorBadgesEditController',41'archive/(?:(?P<id>\d+)/)?'42=> 'PhabricatorBadgesArchiveController',43'view/(?:(?P<id>\d+)/)?'44=> 'PhabricatorBadgesViewController',45'recipients/' => array(46'(?P<id>[1-9]\d*)/'47=> 'PhabricatorBadgesRecipientsController',48'(?P<id>[1-9]\d*)/add/'49=> 'PhabricatorBadgesEditRecipientsController',50'(?P<id>[1-9]\d*)/remove/'51=> 'PhabricatorBadgesRemoveRecipientsController',52),53),54);55}5657protected function getCustomCapabilities() {58return array(59PhabricatorBadgesCreateCapability::CAPABILITY => array(60'default' => PhabricatorPolicies::POLICY_ADMIN,61'caption' => pht('Default create policy for badges.'),62),63PhabricatorBadgesDefaultEditCapability::CAPABILITY => array(64'default' => PhabricatorPolicies::POLICY_ADMIN,65'caption' => pht('Default edit policy for badges.'),66'template' => PhabricatorBadgesPHIDType::TYPECONST,67),68);69}7071}727374