summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-09-18 11:57:56 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-09-18 11:57:56 +0200
commit0eb37e2d64f347dfbb869aafbd4efdcd2d72497e (patch)
tree45714513b7f6d4cf9f1c8844fc6f79f039fe083d /lib
parent3ca61db63b9e32f316479582171f4b1b2144f295 (diff)
parentc3420fface77c584ae83bf20f36ec192399e5e09 (diff)
downloadnextcloud-server-0eb37e2d64f347dfbb869aafbd4efdcd2d72497e.tar.gz
nextcloud-server-0eb37e2d64f347dfbb869aafbd4efdcd2d72497e.zip
Merge pull request #19092 from owncloud/allow-checking-for-notifiers
Allow checking whether there are notifiers registered
Diffstat (limited to 'lib')
-rw-r--r--lib/private/notification/imanager.php6
-rw-r--r--lib/private/notification/manager.php8
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/private/notification/imanager.php b/lib/private/notification/imanager.php
index 0cd92b33251..f4a5fb14e31 100644
--- a/lib/private/notification/imanager.php
+++ b/lib/private/notification/imanager.php
@@ -53,4 +53,10 @@ interface IManager extends IApp, INotifier {
* @since 8.2.0
*/
public function createNotification();
+
+ /**
+ * @return bool
+ * @since 8.2.0
+ */
+ public function hasNotifiers();
}
diff --git a/lib/private/notification/manager.php b/lib/private/notification/manager.php
index 9635925e38e..0d5bb9be514 100644
--- a/lib/private/notification/manager.php
+++ b/lib/private/notification/manager.php
@@ -113,6 +113,14 @@ class Manager implements IManager {
}
/**
+ * @return bool
+ * @since 8.2.0
+ */
+ public function hasNotifiers() {
+ return !empty($this->notifiersClosures);
+ }
+
+ /**
* @param INotification $notification
* @return null
* @throws \InvalidArgumentException When the notification is not valid