Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / settings / setting / PhabricatorSearchScopeSetting.php
blobc4b194154086e3b74c45425bc33fcf036e93fdf4
1 <?php
3 final class PhabricatorSearchScopeSetting
4 extends PhabricatorSelectSetting {
6 const SETTINGKEY = 'search-scope';
8 public function getSettingName() {
9 return pht('Search Scope');
12 public function getSettingPanelKey() {
13 return PhabricatorSearchSettingsPanel::PANELKEY;
16 public function getSettingDefaultValue() {
17 return 'all';
20 protected function getControlInstructions() {
21 return pht(
22 'Choose the default behavior of the global search in the main menu.');
25 protected function getSelectOptions() {
26 $scopes = PhabricatorMainMenuSearchView::getGlobalSearchScopeItems(
27 $this->getViewer(),
28 new PhabricatorSettingsApplication(),
29 $only_global = true);
31 $scope_map = array();
32 foreach ($scopes as $scope) {
33 if (!isset($scope['value'])) {
34 continue;
36 $scope_map[$scope['value']] = $scope['name'];
39 return $scope_map;