1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-26 05:29:06 +01:00
phorge-phorge/src/applications/packages/application/PhabricatorPackagesApplication.php
epriestley ee37eca2e4 Add PackagesVersion
Summary:
Ref T8116. A version has:

  - a package (like "Arcanist") which it belongs to;
  - a name (like "v3.1.5").

The name is immutable and unique, like the package key and publisher key.

Policy stuff:

  - Versions have the exact same policies as their packages.
  - You must be able to edit a package to create new versions of it.

This is still entirely uninteresting.

Test Plan: {F1731703}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8116

Differential Revision: https://secure.phabricator.com/D16316
2016-07-27 12:24:32 -07:00

64 lines
1.7 KiB
PHP

<?php
final class PhabricatorPackagesApplication extends PhabricatorApplication {
public function getName() {
return pht('Packages');
}
public function getShortDescription() {
return pht('Publish Software');
}
public function getFlavorText() {
return pht('Applications and Extensions');
}
public function getBaseURI() {
return '/packages/';
}
public function getIcon() {
return 'fa-gift';
}
public function isPrototype() {
return true;
}
public function getRoutes() {
return array(
'/package/' => array(
'(?P<publisherKey>[^/]+)/' => array(
'' => 'PhabricatorPackagesPublisherViewController',
'(?P<packageKey>[^/]+)/' => array(
'' => 'PhabricatorPackagesPackageViewController',
'(?P<versionKey>[^/]+)/' =>
'PhabricatorPackagesVersionViewController',
),
),
),
'/packages/' => array(
'publisher/' => array(
$this->getQueryRoutePattern() =>
'PhabricatorPackagesPublisherListController',
$this->getEditRoutePattern('edit/') =>
'PhabricatorPackagesPublisherEditController',
),
'package/' => array(
$this->getQueryRoutePattern() =>
'PhabricatorPackagesPackageListController',
$this->getEditRoutePattern('edit/') =>
'PhabricatorPackagesPackageEditController',
),
'version/' => array(
$this->getQueryRoutePattern() =>
'PhabricatorPackagesVersionListController',
$this->getEditRoutePattern('edit/') =>
'PhabricatorPackagesVersionEditController',
),
),
);
}
}