Add UserNotificationEvent::getObjectType()
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 29 Jun 2020 13:43:46 +0000 (15:43 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 29 Jun 2020 14:13:21 +0000 (16:13 +0200)
wcfsetup/install/files/lib/data/user/notification/event/UserNotificationEvent.class.php

index d8e7366d652c771ff3d75281c4c4abca96a6d8b3..c45c4098503b2897dda9ce44a71c21e7a31676ab 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 namespace wcf\data\user\notification\event;
+use wcf\data\object\type\ObjectType;
+use wcf\data\object\type\ObjectTypeCache;
 use wcf\data\ProcessibleDatabaseObject;
 use wcf\data\TDatabaseObjectOptions;
 use wcf\data\TDatabaseObjectPermissions;
@@ -31,4 +33,14 @@ class UserNotificationEvent extends ProcessibleDatabaseObject {
         * @inheritDoc
         */
        protected static $processorInterface = IUserNotificationEvent::class;
+       
+       /**
+        * Returns the object type of this event.
+        *
+        * @return      ObjectType
+        * @since 5.3
+        */
+       public function getObjectType() {
+               return ObjectTypeCache::getInstance()->getObjectType($this->objectTypeID);
+       }
 }