Path: blob/master/src/applications/herald/application/PhabricatorHeraldApplication.php
12256 views
<?php12final class PhabricatorHeraldApplication extends PhabricatorApplication {34public function getBaseURI() {5return '/herald/';6}78public function getIcon() {9return 'fa-bullhorn';10}1112public function getName() {13return pht('Herald');14}1516public function getShortDescription() {17return pht('Create Notification Rules');18}1920public function getTitleGlyph() {21return "\xE2\x98\xBF";22}2324public function getHelpDocumentationArticles(PhabricatorUser $viewer) {25return array(26array(27'name' => pht('Herald User Guide'),28'href' => PhabricatorEnv::getDoclink('Herald User Guide'),29),30array(31'name' => pht('User Guide: Webhooks'),32'href' => PhabricatorEnv::getDoclink('User Guide: Webhooks'),33),34);35}3637public function getFlavorText() {38return pht('Watch for danger!');39}4041public function getApplicationGroup() {42return self::GROUP_UTILITIES;43}4445public function getRemarkupRules() {46return array(47new HeraldRemarkupRule(),48);49}5051public function getRoutes() {52return array(53'/H(?P<id>[1-9]\d*)' => 'HeraldRuleViewController',54'/herald/' => array(55'(?:query/(?P<queryKey>[^/]+)/)?' => 'HeraldRuleListController',56'new/' => 'HeraldNewController',57'create/' => 'HeraldNewController',58'edit/(?:(?P<id>[1-9]\d*)/)?' => 'HeraldRuleController',59'disable/(?P<id>[1-9]\d*)/(?P<action>[^/]+)/'60=> 'HeraldDisableController',61'test/' => 'HeraldTestConsoleController',62'transcript/' => array(63'' => 'HeraldTranscriptListController',64'(?:query/(?P<queryKey>[^/]+)/)?' => 'HeraldTranscriptListController',65'(?P<id>[1-9]\d*)/(?:(?P<view>[^/]+)/)?'66=> 'HeraldTranscriptController',67),68'webhook/' => array(69$this->getQueryRoutePattern() => 'HeraldWebhookListController',70'view/(?P<id>\d+)/(?:request/(?P<requestID>[^/]+)/)?' =>71'HeraldWebhookViewController',72$this->getEditRoutePattern('edit/') => 'HeraldWebhookEditController',73'test/(?P<id>\d+)/' => 'HeraldWebhookTestController',74'key/(?P<action>view|cycle)/(?P<id>\d+)/' =>75'HeraldWebhookKeyController',76),77),78);79}8081protected function getCustomCapabilities() {82return array(83HeraldManageGlobalRulesCapability::CAPABILITY => array(84'caption' => pht('Global rules can bypass access controls.'),85'default' => PhabricatorPolicies::POLICY_ADMIN,86),87HeraldCreateWebhooksCapability::CAPABILITY => array(88'default' => PhabricatorPolicies::POLICY_ADMIN,89),90);91}9293}949596