Differential D13091 Diff 32217 src/applications/diviner/application/PhabricatorDivinerApplication.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diviner/application/PhabricatorDivinerApplication.php
| Show All 33 Lines | final class PhabricatorDivinerApplication extends PhabricatorApplication { | ||||
| public function getRoutes() { | public function getRoutes() { | ||||
| return array( | return array( | ||||
| '/diviner/' => array( | '/diviner/' => array( | ||||
| '' => 'DivinerMainController', | '' => 'DivinerMainController', | ||||
| 'query/((?<key>[^/]+)/)?' => 'DivinerAtomListController', | 'query/((?<key>[^/]+)/)?' => 'DivinerAtomListController', | ||||
| 'find/' => 'DivinerFindController', | 'find/' => 'DivinerFindController', | ||||
| ), | ), | ||||
| '/book/(?P<book>[^/]+)/' => 'DivinerBookController', | '/book/(?P<book>[^/]+)/' => 'DivinerBookController', | ||||
| '/book/(?P<book>[^/]+)/edit/' => 'DivinerBookEditController', | |||||
| '/book/'. | '/book/'. | ||||
| '(?P<book>[^/]+)/'. | '(?P<book>[^/]+)/'. | ||||
| '(?P<type>[^/]+)/'. | '(?P<type>[^/]+)/'. | ||||
| '(?:(?P<context>[^/]+)/)?'. | '(?:(?P<context>[^/]+)/)?'. | ||||
| '(?P<name>[^/]+)/'. | '(?P<name>[^/]+)/'. | ||||
| '(?:(?P<index>\d+)/)?' => 'DivinerAtomController', | '(?:(?P<index>\d+)/)?' => 'DivinerAtomController', | ||||
| ); | ); | ||||
| } | } | ||||
| public function getApplicationGroup() { | public function getApplicationGroup() { | ||||
| return self::GROUP_UTILITIES; | return self::GROUP_UTILITIES; | ||||
| } | } | ||||
| protected function getCustomCapabilities() { | |||||
| return array( | |||||
| DivinerDefaultViewCapability::CAPABILITY => array( | |||||
| 'template' => DivinerBookPHIDType::TYPECONST, | |||||
| ), | |||||
| DivinerDefaultEditCapability::CAPABILITY => array( | |||||
epriestley: Add `'template'` with the PHID type for "default X capability" after T5681 / D13251. This will… | |||||
| 'default' => PhabricatorPolicies::POLICY_ADMIN, | |||||
| 'template' => DivinerBookPHIDType::TYPECONST, | |||||
| ), | |||||
| ); | |||||
| } | |||||
| public function getRemarkupRules() { | public function getRemarkupRules() { | ||||
| return array( | return array( | ||||
| new DivinerSymbolRemarkupRule(), | new DivinerSymbolRemarkupRule(), | ||||
| ); | ); | ||||
| } | } | ||||
| public function getApplicationSearchDocumentTypes() { | public function getApplicationSearchDocumentTypes() { | ||||
| return array( | return array( | ||||
| DivinerAtomPHIDType::TYPECONST, | DivinerAtomPHIDType::TYPECONST, | ||||
| DivinerBookPHIDType::TYPECONST, | DivinerBookPHIDType::TYPECONST, | ||||
| ); | ); | ||||
| } | } | ||||
| } | } | ||||
Add 'template' with the PHID type for "default X capability" after T5681 / D13251. This will provide a hint about object policies which are suitable for selection in this control (this is mostly groundwork for future changes, it will have no real effect today). Something like: