Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99337379
PhabricatorDarkConsoleSetting.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jan 23, 15:06
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Jan 25, 15:06 (1 d, 19 h)
Engine
blob
Format
Raw Data
Handle
23780782
Attached To
rPH Phabricator
PhabricatorDarkConsoleSetting.php
View Options
<?php
final
class
PhabricatorDarkConsoleSetting
extends
PhabricatorSelectSetting
{
const
SETTINGKEY
=
'dark_console'
;
const
VALUE_DARKCONSOLE_DISABLED
=
'0'
;
const
VALUE_DARKCONSOLE_ENABLED
=
'1'
;
public
function
getSettingName
()
{
return
pht
(
'DarkConsole'
);
}
public
function
getSettingPanelKey
()
{
return
PhabricatorDeveloperPreferencesSettingsPanel
::
PANELKEY
;
}
protected
function
getSettingOrder
()
{
return
100
;
}
protected
function
isEnabledForViewer
(
PhabricatorUser
$viewer
)
{
return
PhabricatorEnv
::
getEnvConfig
(
'darkconsole.enabled'
);
}
protected
function
getControlInstructions
()
{
return
pht
(
'DarkConsole is a debugging console for developing and troubleshooting '
.
'Phabricator applications. After enabling DarkConsole, press the '
.
'{nav `} key on your keyboard to toggle it on or off.'
);
}
public
function
getSettingDefaultValue
()
{
return
self
::
VALUE_DARKCONSOLE_DISABLED
;
}
protected
function
getSelectOptions
()
{
return
array
(
self
::
VALUE_DARKCONSOLE_DISABLED
=>
pht
(
'Disable DarkConsole'
),
self
::
VALUE_DARKCONSOLE_ENABLED
=>
pht
(
'Enable DarkConsole'
),
);
}
public
function
expandSettingTransaction
(
$object
,
$xaction
)
{
// If the user has hidden the DarkConsole UI, forget their setting when
// they enable or disable it.
return
array
(
$xaction
,
$this
->
newSettingTransaction
(
$object
,
PhabricatorDarkConsoleVisibleSetting
::
SETTINGKEY
,
1
),
);
}
}
Event Timeline
Log In to Comment