Added getEvents() method
authorMarcel Werk <burntime@woltlab.com>
Mon, 5 May 2014 13:55:19 +0000 (15:55 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 5 May 2014 13:55:19 +0000 (15:55 +0200)
wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php

index c935847aa2f7f0590654389c77c8ed7db5127700..dbd16880fc6717e5702aa6a9ffc1d2be48ad4d2c 100644 (file)
@@ -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.
         *