1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 11:22:40 +01:00
phorge-phorge/src/applications/phriction/application/PhabricatorPhrictionApplication.php
Joshua Spence 0c8f487b0f Implement the getName method in PhabricatorApplication subclasses
Summary: Provide an implementation for the `getName` method rather than automagically determining the application name.

Test Plan: Saw reasonable application names in the launcher.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D10027
2014-07-23 23:52:50 +10:00

73 lines
1.7 KiB
PHP

<?php
final class PhabricatorPhrictionApplication extends PhabricatorApplication {
public function getName() {
return pht('Phriction');
}
public function getShortDescription() {
return pht('Wiki');
}
public function getBaseURI() {
return '/w/';
}
public function getIconName() {
return 'phriction';
}
public function isPinnedByDefault(PhabricatorUser $viewer) {
return true;
}
public function getHelpURI() {
return PhabricatorEnv::getDoclink('Phriction User Guide');
}
public function getTitleGlyph() {
return "\xE2\x9A\xA1";
}
public function getRemarkupRules() {
return array(
new PhrictionRemarkupRule(),
);
}
public function getEventListeners() {
return array(
new PhrictionActionMenuEventListener(),
);
}
public function getRoutes() {
return array(
// Match "/w/" with slug "/".
'/w(?P<slug>/)' => 'PhrictionDocumentController',
// Match "/w/x/y/z/" with slug "x/y/z/".
'/w/(?P<slug>.+/)' => 'PhrictionDocumentController',
'/phriction/' => array(
'(?:query/(?P<queryKey>[^/]+)/)?' => 'PhrictionListController',
'history(?P<slug>/)' => 'PhrictionHistoryController',
'history/(?P<slug>.+/)' => 'PhrictionHistoryController',
'edit/(?:(?P<id>[1-9]\d*)/)?' => 'PhrictionEditController',
'delete/(?P<id>[1-9]\d*)/' => 'PhrictionDeleteController',
'new/' => 'PhrictionNewController',
'move/(?:(?P<id>[1-9]\d*)/)?' => 'PhrictionMoveController',
'preview/' => 'PhabricatorMarkupPreviewController',
'diff/(?P<id>[1-9]\d*)/' => 'PhrictionDiffController',
),
);
}
public function getApplicationOrder() {
return 0.140;
}
}