Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / settings / setting / PhabricatorConpherenceNotificationsSetting.php
blobcb792e018094c80c2e21b0a6e562e5e1107c2d26
1 <?php
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() {
20 return pht(
21 'Choose the default notification behavior for Conpherence rooms.');
24 protected function isEnabledForViewer(PhabricatorUser $viewer) {
25 return PhabricatorApplication::isClassInstalledForViewer(
26 'PhabricatorConpherenceApplication',
27 $viewer);
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() {
44 return array(
45 self::VALUE_CONPHERENCE_EMAIL => pht('Send Email'),
46 self::VALUE_CONPHERENCE_NOTIFY => pht('Send Notifications'),