Differential D17020 Diff 41522 src/applications/release/application/PhabricatorReleaseApplication.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/release/application/PhabricatorReleaseApplication.php
Show All 24 Lines | final class PhabricatorReleaseApplication extends PhabricatorApplication { | ||||
public function getApplicationGroup() { | public function getApplicationGroup() { | ||||
return self::GROUP_UTILITIES; | return self::GROUP_UTILITIES; | ||||
} | } | ||||
public function isPrototype() { | public function isPrototype() { | ||||
return true; | return true; | ||||
} | } | ||||
public function getEventListeners() { | |||||
return array( | |||||
new ReleaseRenderEventListener(), | |||||
); | |||||
} | |||||
public function getRemarkupRules() { | public function getRemarkupRules() { | ||||
return array( | return array( | ||||
new PhabricatorReleaseRemarkupRule(), | new PhabricatorReleaseRemarkupRule(), | ||||
); | ); | ||||
} | } | ||||
protected function getCustomCapabilities() { | protected function getCustomCapabilities() { | ||||
return array( | return array( | ||||
ReleaseReleaseCreateReleaseCapability::CAPABILITY => array(), | ReleaseReleaseCreateReleaseCapability::CAPABILITY => array(), | ||||
ReleaseReleaseDefaultViewCapability::CAPABILITY => array( | ReleaseReleaseDefaultViewCapability::CAPABILITY => array( | ||||
'caption' => pht('Default edit policy for newly created releases.'), | 'caption' => pht('Default edit policy for newly created releases.'), | ||||
'template' => ReleaseReleasePHIDType::TYPECONST, | 'template' => ReleaseReleasePHIDType::TYPECONST, | ||||
'default' => PhabricatorPolicies::POLICY_PUBLIC, | 'default' => PhabricatorPolicies::POLICY_PUBLIC, | ||||
), | ), | ||||
ReleaseReleaseDefaultEditCapability::CAPABILITY => array( | ReleaseReleaseDefaultEditCapability::CAPABILITY => array( | ||||
'caption' => pht('Default view policy for newly created releases.'), | 'caption' => pht('Default view policy for newly created releases.'), | ||||
'template' => ReleaseReleasePHIDType::TYPECONST, | 'template' => ReleaseReleasePHIDType::TYPECONST, | ||||
'default' => PhabricatorPolicies::POLICY_USER, | 'default' => PhabricatorPolicies::POLICY_USER, | ||||
), | ), | ||||
); | ); | ||||
} | } | ||||
public function getRoutes() { | public function getRoutes() { | ||||
return array( | return array( | ||||
'/X(?P<id>[1-9]\d*)' => 'ReleaseReleaseDetailsController', | '/X(?P<id>[1-9]\d*)/?' => 'ReleaseReleaseDetailsController', | ||||
'/Y(?P<id>[1-9]\d*)' => 'ReleaseChangeRequestDetailsController', | |||||
'/release/' => array( | '/release/' => array( | ||||
$this->getEditRoutePattern('edit/') => 'ReleaseReleaseEditController', | $this->getEditRoutePattern('edit/') => 'ReleaseReleaseEditController', | ||||
'(?:query/(?P<queryKey>[^/]+)/)?' => 'ReleaseReleaseListController', | '(?:query/(?P<queryKey>[^/]+)/)?' => 'ReleaseReleaseListController', | ||||
// TODO new release | // TODO new release | ||||
'request/' => array( | |||||
'revision/(?P<revision>[^/]*)/' => | |||||
'ReleaseChangeRequestFromRevisionController', | |||||
), | |||||
'changerequest/' => array( | |||||
'(?:query/(?P<queryKey>[^/]+)/)?' => | |||||
'ReleaseChangeRequestListController', | |||||
$this->getEditRoutePattern('edit/') => | |||||
'ReleaseChangeRequestEditController', | |||||
'action/(?P<phid>[^/]*)/(?P<action>[^/]*)/' => | |||||
'ReleaseChangeRequestActionController', | |||||
), | |||||
), | ), | ||||
); | ); | ||||
} | } | ||||
} | } |