Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/setting/PhabricatorSearchScopeSetting.php
Show All 19 Lines | final class PhabricatorSearchScopeSetting | ||||
protected function getControlInstructions() { | protected function getControlInstructions() { | ||||
return pht( | return pht( | ||||
'Choose the default behavior of the global search in the main menu.'); | 'Choose the default behavior of the global search in the main menu.'); | ||||
} | } | ||||
protected function getSelectOptions() { | protected function getSelectOptions() { | ||||
$scopes = PhabricatorMainMenuSearchView::getGlobalSearchScopeItems( | $scopes = PhabricatorMainMenuSearchView::getGlobalSearchScopeItems( | ||||
$this->getViewer(), | $this->getViewer(), | ||||
new PhabricatorSettingsApplication()); | new PhabricatorSettingsApplication(), | ||||
$only_global = true); | |||||
$scope_map = array(); | $scope_map = array(); | ||||
foreach ($scopes as $scope) { | foreach ($scopes as $scope) { | ||||
if (!isset($scope['value'])) { | if (!isset($scope['value'])) { | ||||
continue; | continue; | ||||
} | } | ||||
$scope_map[$scope['value']] = $scope['name']; | $scope_map[$scope['value']] = $scope['name']; | ||||
} | } | ||||
return $scope_map; | return $scope_map; | ||||
} | } | ||||
} | } |