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

55 lines
1.2 KiB
PHP
Raw Normal View History

<?php
final class PhabricatorApplicationSettings extends PhabricatorApplication {
public function getBaseURI() {
return '/settings/';
}
public function getShortDescription() {
return 'User Preferences';
}
public function getIconName() {
return 'settings';
}
public function canUninstall() {
return false;
}
public function getRoutes() {
return array(
'/settings/' => array(
'(?: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 = new PHUIListItemView();
$item->setName(pht('Settings'));
$item->setIcon('settings');
$item->addClass('core-menu-item');
$item->setSelected($selected);
$item->setHref('/settings/');
$items[] = $item;
}
return $items;
}
}