Differential D16022 Diff 38574 src/applications/settings/setting/PhabricatorConpherenceNotificationsSetting.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/setting/PhabricatorConpherenceNotificationsSetting.php
| <?php | <?php | ||||
| final class PhabricatorConpherenceNotificationsSetting | final class PhabricatorConpherenceNotificationsSetting | ||||
| extends PhabricatorSelectSetting { | extends PhabricatorSelectSetting { | ||||
| const SETTINGKEY = 'conph-notifications'; | const SETTINGKEY = 'conph-notifications'; | ||||
| const VALUE_CONPHERENCE_EMAIL = '0'; | const VALUE_CONPHERENCE_EMAIL = '0'; | ||||
| const VALUE_CONPHERENCE_NOTIFY = '1'; | const VALUE_CONPHERENCE_NOTIFY = '1'; | ||||
| public function getSettingName() { | public function getSettingName() { | ||||
| return pht('Conpherence Notifications'); | return pht('Conpherence Notifications'); | ||||
| } | } | ||||
| public function getSettingPanelKey() { | |||||
| return PhabricatorConpherencePreferencesSettingsPanel::PANELKEY; | |||||
| } | |||||
| protected function getControlInstructions() { | protected function getControlInstructions() { | ||||
| return pht( | return pht( | ||||
| 'Choose the default notification behavior for Conpherence rooms.'); | 'Choose the default notification behavior for Conpherence rooms.'); | ||||
| } | } | ||||
| protected function isEnabledForViewer(PhabricatorUser $viewer) { | |||||
| return PhabricatorApplication::isClassInstalledForViewer( | |||||
| 'PhabricatorConpherenceApplication', | |||||
| $viewer); | |||||
| } | |||||
| public function getSettingDefaultValue() { | public function getSettingDefaultValue() { | ||||
| return self::VALUE_CONPHERENCE_EMAIL; | return self::VALUE_CONPHERENCE_EMAIL; | ||||
| } | } | ||||
| protected function getSelectOptions() { | protected function getSelectOptions() { | ||||
| return array( | return array( | ||||
| self::VALUE_CONPHERENCE_EMAIL => pht('Send Email'), | self::VALUE_CONPHERENCE_EMAIL => pht('Send Email'), | ||||
| self::VALUE_CONPHERENCE_NOTIFY => pht('Send Notifications'), | self::VALUE_CONPHERENCE_NOTIFY => pht('Send Notifications'), | ||||
| ); | ); | ||||
| } | } | ||||
| } | } | ||||