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() {
25 public function getApplicationGroup() {
26 return self
::GROUP_UTILITIES
;
29 public function isPrototype() {
33 protected function getCustomCapabilities() {
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() {
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',
74 $this->getQueryRoutePattern() =>
75 'PhabricatorPackagesPackageListController',
76 $this->getEditRoutePattern('edit/') =>
77 'PhabricatorPackagesPackageEditController',
80 $this->getQueryRoutePattern() =>
81 'PhabricatorPackagesVersionListController',
82 $this->getEditRoutePattern('edit/') =>
83 'PhabricatorPackagesVersionEditController',