Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / ponder / application / PhabricatorPonderApplication.php
blob56973447f95983b2cde18986426cb5391ef4ad3e
1 <?php
3 final class PhabricatorPonderApplication extends PhabricatorApplication {
5 public function getBaseURI() {
6 return '/ponder/';
9 public function getName() {
10 return pht('Ponder');
13 public function getShortDescription() {
14 return pht('Questions and Answers');
17 public function getIcon() {
18 return 'fa-university';
21 public function getTitleGlyph() {
22 return "\xE2\x97\xB3";
25 public function getRemarkupRules() {
26 return array(
27 new PonderRemarkupRule(),
31 public function getApplicationGroup() {
32 return self::GROUP_UTILITIES;
35 public function supportsEmailIntegration() {
36 return true;
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(),
47 pht('Learn More')));
50 public function getRoutes() {
51 return array(
52 '/Q(?P<id>[1-9]\d*)'
53 => 'PonderQuestionViewController',
54 '/ponder/' => array(
55 '(?:query/(?P<queryKey>[^/]+)/)?'
56 => 'PonderQuestionListController',
57 'answer/' => array(
58 'add/'
59 => 'PonderAnswerSaveController',
60 'edit/(?P<id>\d+)/'
61 => 'PonderAnswerEditController',
62 'comment/(?P<id>\d+)/'
63 => 'PonderAnswerCommentController',
64 'history/(?P<id>\d+)/'
65 => 'PonderAnswerHistoryController',
67 'question/' => array(
68 $this->getEditRoutePattern('edit/')
69 => 'PonderQuestionEditController',
70 'create/'
71 => 'PonderQuestionEditController',
72 'comment/(?P<id>\d+)/'
73 => 'PonderQuestionCommentController',
74 'history/(?P<id>\d+)/'
75 => 'PonderQuestionHistoryController',
77 'preview/'
78 => 'PhabricatorMarkupPreviewController',
79 'question/status/(?P<id>[1-9]\d*)/'
80 => 'PonderQuestionStatusController',
85 public function getMailCommandObjects() {
86 return array(
87 'question' => array(
88 'name' => pht('Email Commands: Questions'),
89 'header' => pht('Interacting with Ponder Questions'),
90 'object' => new PonderQuestion(),
91 'summary' => pht(
92 'This page documents the commands you can use to interact with '.
93 'questions in Ponder.'),
98 protected function getCustomCapabilities() {
99 return array(
100 PonderDefaultViewCapability::CAPABILITY => array(
101 'template' => PonderQuestionPHIDType::TYPECONST,
102 'capability' => PhabricatorPolicyCapability::CAN_VIEW,
104 PonderModerateCapability::CAPABILITY => array(
105 'default' => PhabricatorPolicies::POLICY_ADMIN,
106 'template' => PonderQuestionPHIDType::TYPECONST,
107 'capability' => PhabricatorPolicyCapability::CAN_EDIT,
112 public function getApplicationSearchDocumentTypes() {
113 return array(
114 PonderQuestionPHIDType::TYPECONST,