pht('Herald User Guide'), 'href' => PhabricatorEnv::getDoclink('Herald User Guide'), ), array( 'name' => pht('User Guide: Webhooks'), 'href' => PhabricatorEnv::getDoclink('User Guide: Webhooks'), ), ); } public function getFlavorText() { return pht('Watch for danger!'); } public function getApplicationGroup() { return self::GROUP_UTILITIES; } public function getRemarkupRules() { return array( new HeraldRemarkupRule(), ); } public function getMonograms() { return array('H'); } public function getRoutes() { return array( '/H(?P[1-9]\d*)' => 'HeraldRuleViewController', '/herald/' => array( '(?:query/(?P[^/]+)/)?' => 'HeraldRuleListController', 'new/' => 'HeraldNewController', 'create/' => 'HeraldNewController', 'edit/(?:(?P[1-9]\d*)/)?' => 'HeraldRuleController', 'disable/(?P[1-9]\d*)/(?P[^/]+)/' => 'HeraldDisableController', 'test/' => 'HeraldTestConsoleController', 'transcript/' => array( '' => 'HeraldTranscriptListController', '(?:query/(?P[^/]+)/)?' => 'HeraldTranscriptListController', '(?P[1-9]\d*)/(?:(?P[^/]+)/)?' => 'HeraldTranscriptController', ), 'webhook/' => array( $this->getQueryRoutePattern() => 'HeraldWebhookListController', 'view/(?P\d+)/(?:request/(?P[^/]+)/)?' => 'HeraldWebhookViewController', $this->getEditRoutePattern('edit/') => 'HeraldWebhookEditController', 'test/(?P\d+)/' => 'HeraldWebhookTestController', 'key/(?Pview|cycle)/(?P\d+)/' => 'HeraldWebhookKeyController', ), ), ); } protected function getCustomCapabilities() { return array( HeraldManageGlobalRulesCapability::CAPABILITY => array( 'caption' => pht('Global rules can bypass access controls.'), 'default' => PhabricatorPolicies::POLICY_ADMIN, ), HeraldCreateWebhooksCapability::CAPABILITY => array( 'default' => PhabricatorPolicies::POLICY_ADMIN, ), ); } }