Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / settings / setting / PhabricatorNotificationsSetting.php
blob12e1f7fab22c1cabd9801efeb7ed65eaf49214ff
1 <?php
3 final class PhabricatorNotificationsSetting
4 extends PhabricatorInternalSetting {
6 const SETTINGKEY = 'desktop-notifications';
8 const WEB_ONLY = 0;
9 const WEB_AND_DESKTOP = 1;
10 const DESKTOP_ONLY = 2;
11 const NONE = 3;
13 public function getSettingName() {
14 return pht('Notifications');
17 public static function getOptionsMap() {
18 return array(
19 self::WEB_ONLY => pht('Web Only'),
20 self::WEB_AND_DESKTOP => pht('Web and Desktop'),
21 self::DESKTOP_ONLY => pht('Desktop Only'),
22 self::NONE => pht('No Notifications'),
26 public static function desktopReady($option) {
27 switch ($option) {
28 case self::WEB_AND_DESKTOP:
29 case self::DESKTOP_ONLY:
30 return true;
32 return false;
35 public static function webReady($option) {
36 switch ($option) {
37 case self::WEB_AND_DESKTOP:
38 case self::WEB_ONLY:
39 return true;
41 return false;