1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-04 03:41:01 +01:00
phorge-phorge/src/applications/settings/application/PhabricatorApplicationSettings.php

62 lines
1.3 KiB
PHP
Raw Normal View History

<?php
final class PhabricatorApplicationSettings extends PhabricatorApplication {
public function getBaseURI() {
return '/settings/';
}
public function getShortDescription() {
return pht('User Preferences');
}
public function getIconName() {
return 'settings';
}
public function canUninstall() {
return false;
}
public function isLaunchable() {
return false;
}
public function getRoutes() {
return array(
'/settings/' => array(
'(?:(?P<id>\d+)/)?(?:panel/(?P<key>[^/]+)/)?'
=> 'PhabricatorSettingsMainController',
'adjust/' => 'PhabricatorSettingsAdjustController',
),
);
}
public function getApplicationGroup() {
return self::GROUP_UTILITIES;
}
public function buildMainMenuItems(
PhabricatorUser $user,
PhabricatorController $controller = null) {
$items = array();
if ($user->isLoggedIn() && $user->isUserActivated()) {
$selected = ($controller instanceof PhabricatorSettingsMainController);
$item = id(new PHUIListItemView())
->setName(pht('Settings'))
->setIcon('settings-sm')
->addClass('core-menu-item')
->setSelected($selected)
->setHref('/settings/')
->setAural(pht('Settings'))
->setOrder(400);
$items[] = $item;
}
return $items;
}
}