Differential D15327 Diff 36968 src/applications/almanac/application/PhabricatorAlmanacApplication.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/almanac/application/PhabricatorAlmanacApplication.php
Show All 37 Lines | final class PhabricatorAlmanacApplication extends PhabricatorApplication { | ||||
public function isPrototype() { | public function isPrototype() { | ||||
return true; | return true; | ||||
} | } | ||||
public function getRoutes() { | public function getRoutes() { | ||||
return array( | return array( | ||||
'/almanac/' => array( | '/almanac/' => array( | ||||
'' => 'AlmanacConsoleController', | '' => 'AlmanacConsoleController', | ||||
'service/' => array( | '(?P<objectType>service)/' => array( | ||||
$this->getQueryRoutePattern() => 'AlmanacServiceListController', | $this->getQueryRoutePattern() => 'AlmanacServiceListController', | ||||
'edit/(?:(?P<id>\d+)/)?' => 'AlmanacServiceEditController', | 'edit/(?:(?P<id>\d+)/)?' => 'AlmanacServiceEditController', | ||||
'view/(?P<name>[^/]+)/' => 'AlmanacServiceViewController', | 'view/(?P<name>[^/]+)/' => 'AlmanacServiceViewController', | ||||
), | ), | ||||
'device/' => array( | '(?P<objectType>device)/' => array( | ||||
$this->getQueryRoutePattern() => 'AlmanacDeviceListController', | $this->getQueryRoutePattern() => 'AlmanacDeviceListController', | ||||
'edit/(?:(?P<id>\d+)/)?' => 'AlmanacDeviceEditController', | 'edit/(?:(?P<id>\d+)/)?' => 'AlmanacDeviceEditController', | ||||
'view/(?P<name>[^/]+)/' => 'AlmanacDeviceViewController', | 'view/(?P<name>[^/]+)/' => 'AlmanacDeviceViewController', | ||||
), | ), | ||||
'interface/' => array( | 'interface/' => array( | ||||
'edit/(?:(?P<id>\d+)/)?' => 'AlmanacInterfaceEditController', | 'edit/(?:(?P<id>\d+)/)?' => 'AlmanacInterfaceEditController', | ||||
), | ), | ||||
'binding/' => array( | 'binding/' => array( | ||||
'edit/(?:(?P<id>\d+)/)?' => 'AlmanacBindingEditController', | 'edit/(?:(?P<id>\d+)/)?' => 'AlmanacBindingEditController', | ||||
'(?P<id>\d+)/' => 'AlmanacBindingViewController', | '(?P<id>\d+)/' => 'AlmanacBindingViewController', | ||||
), | ), | ||||
'network/' => array( | 'network/' => array( | ||||
$this->getQueryRoutePattern() => 'AlmanacNetworkListController', | $this->getQueryRoutePattern() => 'AlmanacNetworkListController', | ||||
'edit/(?:(?P<id>\d+)/)?' => 'AlmanacNetworkEditController', | 'edit/(?:(?P<id>\d+)/)?' => 'AlmanacNetworkEditController', | ||||
'(?P<id>\d+)/' => 'AlmanacNetworkViewController', | '(?P<id>\d+)/' => 'AlmanacNetworkViewController', | ||||
), | ), | ||||
'property/' => array( | |||||
'edit/' => 'AlmanacPropertyEditController', | |||||
'delete/' => 'AlmanacPropertyDeleteController', | |||||
), | |||||
'namespace/' => array( | 'namespace/' => array( | ||||
$this->getQueryRoutePattern() => 'AlmanacNamespaceListController', | $this->getQueryRoutePattern() => 'AlmanacNamespaceListController', | ||||
$this->getEditRoutePattern('edit/') | $this->getEditRoutePattern('edit/') | ||||
=> 'AlmanacNamespaceEditController', | => 'AlmanacNamespaceEditController', | ||||
'(?P<id>\d+)/' => 'AlmanacNamespaceViewController', | '(?P<id>\d+)/' => 'AlmanacNamespaceViewController', | ||||
), | ), | ||||
'property/' => array( | |||||
'delete/' => 'AlmanacPropertyDeleteController', | |||||
'update/' => 'AlmanacPropertyEditController', | |||||
), | |||||
), | ), | ||||
); | ); | ||||
} | } | ||||
protected function getCustomCapabilities() { | protected function getCustomCapabilities() { | ||||
return array( | return array( | ||||
AlmanacCreateServicesCapability::CAPABILITY => array( | AlmanacCreateServicesCapability::CAPABILITY => array( | ||||
'default' => PhabricatorPolicies::POLICY_ADMIN, | 'default' => PhabricatorPolicies::POLICY_ADMIN, | ||||
Show All 17 Lines |