From: Marcel Werk Date: Mon, 5 May 2014 13:55:19 +0000 (+0200) Subject: Added getEvents() method X-Git-Tag: 2.1.0_Alpha_1~845^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1c54fb0c8275f43fdcca03a9666e9885a5cee046;p=GitHub%2FWoltLab%2FWCF.git Added getEvents() method --- 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. *