Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/setting/PhabricatorDarkConsoleSetting.php
| <?php | <?php | ||||
| final class PhabricatorDarkConsoleSetting | final class PhabricatorDarkConsoleSetting | ||||
| extends PhabricatorSelectSetting { | extends PhabricatorSelectSetting { | ||||
| const SETTINGKEY = 'dark_console'; | const SETTINGKEY = 'dark_console'; | ||||
| const VALUE_DARKCONSOLE_DISABLED = '0'; | const VALUE_DARKCONSOLE_DISABLED = '0'; | ||||
| const VALUE_DARKCONSOLE_ENABLED = '1'; | const VALUE_DARKCONSOLE_ENABLED = '1'; | ||||
| public function getSettingName() { | public function getSettingName() { | ||||
| return pht('DarkConsole'); | 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() { | protected function getControlInstructions() { | ||||
| return pht( | return pht( | ||||
| 'DarkConsole is a debugging console for developing and troubleshooting '. | 'DarkConsole is a debugging console for developing and troubleshooting '. | ||||
| 'Phabricator applications. After enabling DarkConsole, press the '. | 'Phabricator applications. After enabling DarkConsole, press the '. | ||||
| '{nav `} key on your keyboard to toggle it on or off.'); | '{nav `} key on your keyboard to toggle it on or off.'); | ||||
| } | } | ||||
| public function getSettingDefaultValue() { | public function getSettingDefaultValue() { | ||||
| Show All 12 Lines | |||||