Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2891754
PhabricatorSearchScopeSetting.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
937 B
Referenced Files
None
Subscribers
None
PhabricatorSearchScopeSetting.php
View Options
<?php
final
class
PhabricatorSearchScopeSetting
extends
PhabricatorSelectSetting
{
const
SETTINGKEY
=
'search-scope'
;
public
function
getSettingName
(
)
{
return
pht
(
'Search Scope'
)
;
}
public
function
getSettingPanelKey
(
)
{
return
PhabricatorSearchSettingsPanel
::
PANELKEY
;
}
public
function
getSettingDefaultValue
(
)
{
return
'all'
;
}
protected
function
getControlInstructions
(
)
{
return
pht
(
'Choose the default behavior of the global search in the main menu.'
)
;
}
protected
function
getSelectOptions
(
)
{
$scopes
=
PhabricatorMainMenuSearchView
::
getGlobalSearchScopeItems
(
$this
->
getViewer
(
)
,
new
PhabricatorSettingsApplication
(
)
,
$only_global
=
true
)
;
$scope_map
=
array
(
)
;
foreach
(
$scopes
as
$scope
)
{
if
(
!
isset
(
$scope
[
'value'
]
)
)
{
continue
;
}
$scope_map
[
$scope
[
'value'
]
]
=
$scope
[
'name'
]
;
}
return
$scope_map
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 15:42 (3 w, 8 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1126105
Default Alt Text
PhabricatorSearchScopeSetting.php (937 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment