@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 122 lines 3.2 kB view raw
1<?php 2 3final class PhabricatorPonderApplication extends PhabricatorApplication { 4 5 public function getBaseURI() { 6 return '/ponder/'; 7 } 8 9 public function getName() { 10 return pht('Ponder'); 11 } 12 13 public function getShortDescription() { 14 return pht('Questions and Answers'); 15 } 16 17 public function getIcon() { 18 return 'fa-university'; 19 } 20 21 public function getTitleGlyph() { 22 return "\xE2\x97\xB3"; 23 } 24 25 public function getRemarkupRules() { 26 return array( 27 new PonderRemarkupRule(), 28 ); 29 } 30 31 public function getApplicationGroup() { 32 return self::GROUP_UTILITIES; 33 } 34 35 public function supportsEmailIntegration() { 36 return true; 37 } 38 39 public function getAppEmailBlurb() { 40 return pht( 41 'Send email to these addresses to create questions. %s', 42 phutil_tag( 43 'a', 44 array( 45 'href' => $this->getInboundEmailSupportLink(), 46 ), 47 pht('Learn More'))); 48 } 49 50 public function getMonograms() { 51 return array('Q'); 52 } 53 54 public function getRoutes() { 55 return array( 56 '/Q(?P<id>[1-9]\d*)' 57 => 'PonderQuestionViewController', 58 '/ponder/' => array( 59 '(?:query/(?P<queryKey>[^/]+)/)?' 60 => 'PonderQuestionListController', 61 'answer/' => array( 62 'add/' 63 => 'PonderAnswerSaveController', 64 'edit/(?P<id>\d+)/' 65 => 'PonderAnswerEditController', 66 'comment/(?P<id>\d+)/' 67 => 'PonderAnswerCommentController', 68 'history/(?P<id>\d+)/' 69 => 'PonderAnswerHistoryController', 70 ), 71 'question/' => array( 72 $this->getEditRoutePattern('edit/') 73 => 'PonderQuestionEditController', 74 'create/' 75 => 'PonderQuestionEditController', 76 'comment/(?P<id>\d+)/' 77 => 'PonderQuestionCommentController', 78 'history/(?P<id>\d+)/' 79 => 'PonderQuestionHistoryController', 80 ), 81 'preview/' 82 => 'PhabricatorMarkupPreviewController', 83 'question/status/(?P<id>[1-9]\d*)/' 84 => 'PonderQuestionStatusController', 85 ), 86 ); 87 } 88 89 public function getMailCommandObjects() { 90 return array( 91 'question' => array( 92 'name' => pht('Email Commands: Questions'), 93 'header' => pht('Interacting with Ponder Questions'), 94 'object' => new PonderQuestion(), 95 'summary' => pht( 96 'This page documents the commands you can use to interact with '. 97 'questions in Ponder.'), 98 ), 99 ); 100 } 101 102 protected function getCustomCapabilities() { 103 return array( 104 PonderDefaultViewCapability::CAPABILITY => array( 105 'template' => PonderQuestionPHIDType::TYPECONST, 106 'capability' => PhabricatorPolicyCapability::CAN_VIEW, 107 ), 108 PonderModerateCapability::CAPABILITY => array( 109 'default' => PhabricatorPolicies::POLICY_ADMIN, 110 'template' => PonderQuestionPHIDType::TYPECONST, 111 'capability' => PhabricatorPolicyCapability::CAN_EDIT, 112 ), 113 ); 114 } 115 116 public function getApplicationSearchDocumentTypes() { 117 return array( 118 PonderQuestionPHIDType::TYPECONST, 119 ); 120 } 121 122}