3 final class PhabricatorConpherenceNotificationsSetting
4 extends PhabricatorSelectSetting
{
6 const SETTINGKEY
= 'conph-notifications';
8 const VALUE_CONPHERENCE_EMAIL
= '0';
9 const VALUE_CONPHERENCE_NOTIFY
= '1';
11 public function getSettingName() {
12 return pht('Conpherence Notifications');
15 public function getSettingPanelKey() {
16 return PhabricatorConpherencePreferencesSettingsPanel
::PANELKEY
;
19 protected function getControlInstructions() {
21 'Choose the default notification behavior for Conpherence rooms.');
24 protected function isEnabledForViewer(PhabricatorUser
$viewer) {
25 return PhabricatorApplication
::isClassInstalledForViewer(
26 'PhabricatorConpherenceApplication',
30 public function getSettingDefaultValue() {
31 return self
::VALUE_CONPHERENCE_EMAIL
;
34 protected function getSelectOptions() {
35 return self
::getOptionsMap();
38 public static function getSettingLabel($key) {
39 $labels = self
::getOptionsMap();
40 return idx($labels, $key, pht('Unknown ("%s")', $key));
43 private static function getOptionsMap() {
45 self
::VALUE_CONPHERENCE_EMAIL
=> pht('Send Email'),
46 self
::VALUE_CONPHERENCE_NOTIFY
=> pht('Send Notifications'),