@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<?php
2
3final class PhabricatorCountdownApplication extends PhabricatorApplication {
4
5 public function getBaseURI() {
6 return '/countdown/';
7 }
8
9 public function getIcon() {
10 return 'fa-rocket';
11 }
12
13 public function getName() {
14 return pht('Countdown');
15 }
16
17 public function getShortDescription() {
18 return pht('Countdown to Events');
19 }
20
21 public function getTitleGlyph() {
22 return "\xE2\x9A\xB2";
23 }
24
25 public function getFlavorText() {
26 return pht('Utilize the full capabilities of your ALU.');
27 }
28
29 public function getApplicationGroup() {
30 return self::GROUP_UTILITIES;
31 }
32
33 public function getRemarkupRules() {
34 return array(
35 new PhabricatorCountdownRemarkupRule(),
36 );
37 }
38
39 public function getMonograms() {
40 return array('C');
41 }
42
43 public function getRoutes() {
44 return array(
45 '/C(?P<id>[1-9]\d*)' => 'PhabricatorCountdownViewController',
46 '/countdown/' => array(
47 '(?:query/(?P<queryKey>[^/]+)/)?'
48 => 'PhabricatorCountdownListController',
49 $this->getEditRoutePattern('edit/')
50 => 'PhabricatorCountdownEditController',
51 ),
52 );
53 }
54
55 protected function getCustomCapabilities() {
56 return array(
57 PhabricatorCountdownCreateCapability::CAPABILITY => array(
58 'default' => PhabricatorPolicies::POLICY_USER,
59 'caption' => pht('Default create policy for countdowns.'),
60 ),
61 PhabricatorCountdownDefaultViewCapability::CAPABILITY => array(
62 'caption' => pht('Default view policy for new countdowns.'),
63 'template' => PhabricatorCountdownCountdownPHIDType::TYPECONST,
64 'capability' => PhabricatorPolicyCapability::CAN_VIEW,
65 ),
66 PhabricatorCountdownDefaultEditCapability::CAPABILITY => array(
67 'caption' => pht('Default edit policy for new countdowns.'),
68 'template' => PhabricatorCountdownCountdownPHIDType::TYPECONST,
69 'capability' => PhabricatorPolicyCapability::CAN_EDIT,
70 ),
71 );
72 }
73
74}