Changeset View
Changeset View
Standalone View
Standalone View
src/applications/home/controller/PhabricatorHomeController.php
Show All 9 Lines | public function buildNav() { | ||||
$applications = id(new PhabricatorApplicationQuery()) | $applications = id(new PhabricatorApplicationQuery()) | ||||
->setViewer($user) | ->setViewer($user) | ||||
->withInstalled(true) | ->withInstalled(true) | ||||
->withUnlisted(false) | ->withUnlisted(false) | ||||
->withLaunchable(true) | ->withLaunchable(true) | ||||
->execute(); | ->execute(); | ||||
$pinned = $user->loadPreferences()->getPinnedApplications( | $pinned = $user->getUserSetting( | ||||
$applications, | PhabricatorPinnedApplicationsSetting::SETTINGKEY); | ||||
$user); | |||||
// Force "Applications" to appear at the bottom. | // Force "Applications" to appear at the bottom. | ||||
$meta_app = 'PhabricatorApplicationsApplication'; | $meta_app = 'PhabricatorApplicationsApplication'; | ||||
$pinned = array_fuse($pinned); | $pinned = array_fuse($pinned); | ||||
unset($pinned[$meta_app]); | unset($pinned[$meta_app]); | ||||
$pinned[$meta_app] = $meta_app; | $pinned[$meta_app] = $meta_app; | ||||
$applications[$meta_app] = PhabricatorApplication::getByClass($meta_app); | $applications[$meta_app] = PhabricatorApplication::getByClass($meta_app); | ||||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |