mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-02 09:58:24 +01:00
d9848d3c46
Summary: Ref T988. Mostly backend changes, with a very rough frontend on top of them. See Conpherence discussion. Test Plan: {F45010} Reviewers: btrahan, chad Reviewed By: chad CC: aran Maniphest Tasks: T988 Differential Revision: https://secure.phabricator.com/D6113
66 lines
1.5 KiB
PHP
66 lines
1.5 KiB
PHP
<?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();
|
|
|
|
$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;
|
|
}
|
|
|
|
|
|
}
|
|
|