Differential D16048 Diff 38616 src/applications/settings/setting/PhabricatorPinnedApplicationsSetting.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/setting/PhabricatorPinnedApplicationsSetting.php
| <?php | <?php | ||||
| final class PhabricatorPinnedApplicationsSetting | final class PhabricatorPinnedApplicationsSetting | ||||
| extends PhabricatorInternalSetting { | extends PhabricatorInternalSetting { | ||||
| const SETTINGKEY = 'app-pinned'; | const SETTINGKEY = 'app-pinned'; | ||||
| public function getSettingName() { | public function getSettingName() { | ||||
| return pht('Pinned Applications'); | return pht('Pinned Applications'); | ||||
| } | } | ||||
| public function getSettingDefaultValue() { | public function getSettingDefaultValue() { | ||||
| $viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
| // If we're editing a template, just show every available application. | |||||
| if (!$viewer) { | |||||
| $viewer = PhabricatorUser::getOmnipotentUser(); | |||||
| } | |||||
| $applications = id(new PhabricatorApplicationQuery()) | $applications = id(new PhabricatorApplicationQuery()) | ||||
| ->setViewer($viewer) | ->setViewer($viewer) | ||||
| ->withInstalled(true) | ->withInstalled(true) | ||||
| ->withUnlisted(false) | ->withUnlisted(false) | ||||
| ->withLaunchable(true) | ->withLaunchable(true) | ||||
| ->execute(); | ->execute(); | ||||
| $pinned = array(); | $pinned = array(); | ||||
| Show All 11 Lines | |||||