From 1c54fb0c8275f43fdcca03a9666e9885a5cee046 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 5 May 2014 15:55:19 +0200 Subject: [PATCH] Added getEvents() method --- .../notification/UserNotificationHandler.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php b/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php index c935847aa2..dbd16880fc 100644 --- a/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php @@ -330,6 +330,18 @@ class UserNotificationHandler extends SingletonFactory { return $this->availableEvents[$objectType][$eventName]; } + /** + * Returns all events for given object type. + * + * @param string $objectType + * @return array<\wcf\system\user\notification\event\IUserNotificationEvent> + */ + public function getEvents($objectType) { + if (!isset($this->availableEvents[$objectType])) return array(); + + return $this->availableEvents[$objectType]; + } + /** * Retrieves a notification id. * -- 2.20.1