]> BookStack Code Mirror - bookstack/blobdiff - app/Theming/ThemeService.php
Themes: Documented public file serving
[bookstack] / app / Theming / ThemeService.php
index 94e4712176b2463acd942ff6336352b948744f55..639854d6ad10e5879358640d5b52a1167b1dce91 100644 (file)
@@ -15,6 +15,15 @@ class ThemeService
      */
     protected array $listeners = [];
 
+    /**
+     * Get the currently configured theme.
+     * Returns an empty string if not configured.
+     */
+    public function getTheme(): string
+    {
+        return config('view.theme') ?? '';
+    }
+
     /**
      * Listen to a given custom theme event,
      * setting up the action to be ran when the event occurs.