Differential D15703 Diff 37833 src/applications/settings/panel/PhabricatorDesktopNotificationsSettingsPanel.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/panel/PhabricatorDesktopNotificationsSettingsPanel.php
<?php | <?php | ||||
final class PhabricatorDesktopNotificationsSettingsPanel | final class PhabricatorDesktopNotificationsSettingsPanel | ||||
extends PhabricatorSettingsPanel { | extends PhabricatorSettingsPanel { | ||||
public function isEnabled() { | public function isEnabled() { | ||||
return PhabricatorEnv::getEnvConfig('notification.enabled') && | $servers = PhabricatorNotificationServerRef::getEnabledAdminServers(); | ||||
PhabricatorApplication::isClassInstalled( | if (!$servers) { | ||||
return false; | |||||
} | |||||
return PhabricatorApplication::isClassInstalled( | |||||
'PhabricatorNotificationsApplication'); | 'PhabricatorNotificationsApplication'); | ||||
} | } | ||||
public function getPanelKey() { | public function getPanelKey() { | ||||
return 'desktopnotifications'; | return 'desktopnotifications'; | ||||
} | } | ||||
public function getPanelName() { | public function getPanelName() { | ||||
return pht('Desktop Notifications'); | return pht('Desktop Notifications'); | ||||
▲ Show 20 Lines • Show All 140 Lines • Show Last 20 Lines |