1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 08:12:40 +01:00
phorge-phorge/src/applications/diviner/application/PhabricatorApplicationDiviner.php

67 lines
1.5 KiB
PHP
Raw Normal View History

<?php
final class PhabricatorApplicationDiviner extends PhabricatorApplication {
public function getBaseURI() {
return '/diviner/';
}
public function getIconName() {
return 'diviner';
}
public function getShortDescription() {
return 'Documentation';
}
public function getTitleGlyph() {
return "\xE2\x97\x89";
}
public function getRoutes() {
return array(
'/diviner/' => array(
'' => 'DivinerLegacyController',
'query/((?<key>[^/]+)/)?' => 'DivinerAtomListController',
),
'/docs/(?P<keyword>[^/]+)/' => 'DivinerJumpController',
'/book/(?P<book>[^/]+)/' => 'DivinerBookController',
'/book/'.
'(?P<book>[^/]+)/'.
'(?P<type>[^/]+)/'.
'(?:(?P<context>[^/]+)/)?'.
'(?P<name>[^/]+)/'.
'(?:(?P<index>\d+)/)?' => 'DivinerAtomController',
);
}
public function getApplicationGroup() {
return self::GROUP_COMMUNICATION;
}
public function buildMainMenuItems(
PhabricatorUser $user,
PhabricatorController $controller = null) {
$items = array();
2012-08-14 15:04:19 +02:00
$application = null;
if ($controller) {
$application = $controller->getCurrentApplication();
}
if ($application && $application->getHelpURI()) {
$item = new PhabricatorMenuItemView();
$item->setName(pht('%s Help', $application->getName()));
$item->setIcon('help');
$item->setHref($application->getHelpURI());
$items[] = $item;
}
return $items;
}
}