Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / packages / application / PhabricatorPackagesApplication.php
blob874a9b5f311411e7e1e78a731369274376e8221c
1 <?php
3 final class PhabricatorPackagesApplication extends PhabricatorApplication {
5 public function getName() {
6 return pht('Packages');
9 public function getShortDescription() {
10 return pht('Publish Software');
13 public function getFlavorText() {
14 return pht('Applications and Extensions');
17 public function getBaseURI() {
18 return '/packages/package/';
21 public function getIcon() {
22 return 'fa-gift';
25 public function getApplicationGroup() {
26 return self::GROUP_UTILITIES;
29 public function isPrototype() {
30 return true;
33 protected function getCustomCapabilities() {
34 return array(
35 PhabricatorPackagesCreatePublisherCapability::CAPABILITY => array(
36 'default' => PhabricatorPolicies::POLICY_ADMIN,
38 PhabricatorPackagesPublisherDefaultEditCapability::CAPABILITY => array(
39 'caption' => pht('Default edit policy for newly created publishers.'),
40 'template' => PhabricatorPackagesPublisherPHIDType::TYPECONST,
41 'default' => PhabricatorPolicies::POLICY_NOONE,
43 PhabricatorPackagesPackageDefaultViewCapability::CAPABILITY => array(
44 'caption' => pht('Default edit policy for newly created packages.'),
45 'template' => PhabricatorPackagesPackagePHIDType::TYPECONST,
47 PhabricatorPackagesPackageDefaultEditCapability::CAPABILITY => array(
48 'caption' => pht('Default view policy for newly created packages.'),
49 'template' => PhabricatorPackagesPackagePHIDType::TYPECONST,
50 'default' => PhabricatorPolicies::POLICY_NOONE,
54 public function getRoutes() {
55 return array(
56 '/package/' => array(
57 '(?P<publisherKey>[^/]+)/' => array(
58 '' => 'PhabricatorPackagesPublisherViewController',
59 '(?P<packageKey>[^/]+)/' => array(
60 '' => 'PhabricatorPackagesPackageViewController',
61 '(?P<versionKey>[^/]+)/' =>
62 'PhabricatorPackagesVersionViewController',
66 '/packages/' => array(
67 'publisher/' => array(
68 $this->getQueryRoutePattern() =>
69 'PhabricatorPackagesPublisherListController',
70 $this->getEditRoutePattern('edit/') =>
71 'PhabricatorPackagesPublisherEditController',
73 'package/' => array(
74 $this->getQueryRoutePattern() =>
75 'PhabricatorPackagesPackageListController',
76 $this->getEditRoutePattern('edit/') =>
77 'PhabricatorPackagesPackageEditController',
79 'version/' => array(
80 $this->getQueryRoutePattern() =>
81 'PhabricatorPackagesVersionListController',
82 $this->getEditRoutePattern('edit/') =>
83 'PhabricatorPackagesVersionEditController',