diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-09-18 11:57:56 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-09-18 11:57:56 +0200 |
commit | 0eb37e2d64f347dfbb869aafbd4efdcd2d72497e (patch) | |
tree | 45714513b7f6d4cf9f1c8844fc6f79f039fe083d /lib | |
parent | 3ca61db63b9e32f316479582171f4b1b2144f295 (diff) | |
parent | c3420fface77c584ae83bf20f36ec192399e5e09 (diff) | |
download | nextcloud-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.php | 6 | ||||
-rw-r--r-- | lib/private/notification/manager.php | 8 |
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 |