]> BookStack Code Mirror - bookstack/blobdiff - app/Theming/ThemeService.php
Includes: Added back support for parse theme event
[bookstack] / app / Theming / ThemeService.php
index 31a7d3c64d32c778020474fbcc43837467304c61..0c252653699dfa48e8d34deab8423f4c67775a8d 100644 (file)
@@ -48,6 +48,14 @@ class ThemeService
         return null;
     }
 
+    /**
+     * Check if there are listeners registered for the given event name.
+     */
+    public function hasListeners(string $event): bool
+    {
+        return count($this->listeners[$event] ?? []) > 0;
+    }
+
     /**
      * Register a new custom artisan command to be available.
      */