Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/setting/PhabricatorEmailFormatSetting.php
| <?php | <?php | ||||
| final class PhabricatorEmailFormatSetting | final class PhabricatorEmailFormatSetting | ||||
| extends PhabricatorSelectSetting { | extends PhabricatorSelectSetting { | ||||
| const SETTINGKEY = 'html-emails'; | const SETTINGKEY = 'html-emails'; | ||||
| const VALUE_HTML_EMAIL = 'true'; | const VALUE_HTML_EMAIL = 'true'; | ||||
| const VALUE_TEXT_EMAIL = 'false'; | const VALUE_TEXT_EMAIL = 'false'; | ||||
| public function getSettingName() { | public function getSettingName() { | ||||
| return pht('HTML Email'); | return pht('HTML Email'); | ||||
| } | } | ||||
| public function getSettingPanelKey() { | |||||
| return PhabricatorEmailFormatSettingsPanel::PANELKEY; | |||||
| } | |||||
| protected function getSettingOrder() { | |||||
| return 100; | |||||
| } | |||||
| protected function isEnabledForViewer(PhabricatorUser $viewer) { | |||||
| return PhabricatorMetaMTAMail::shouldMultiplexAllMail(); | |||||
| } | |||||
| protected function getControlInstructions() { | protected function getControlInstructions() { | ||||
| return pht( | return pht( | ||||
| 'You can opt to receive plain text email from Phabricator instead '. | 'You can opt to receive plain text email from Phabricator instead '. | ||||
| 'of HTML email. Plain text email works better with some clients.'); | 'of HTML email. Plain text email works better with some clients.'); | ||||
| } | } | ||||
| public function getSettingDefaultValue() { | public function getSettingDefaultValue() { | ||||
| return self::VALUE_HTML_EMAIL; | return self::VALUE_HTML_EMAIL; | ||||
| Show All 10 Lines | |||||