]> BookStack Code Mirror - bookstack/blobdiff - app/Theming/ThemeService.php
Fixed OIDC Logout
[bookstack] / app / Theming / ThemeService.php
index 602abaf1c5a35e4845cbde67aec8981071271f5c..bb91643e308114b567119fed99349b7e6951f98e 100644 (file)
@@ -2,7 +2,10 @@
 
 namespace BookStack\Theming;
 
-use BookStack\Auth\Access\SocialAuthService;
+use BookStack\Access\SocialAuthService;
+use Illuminate\Console\Application;
+use Illuminate\Console\Application as Artisan;
+use Symfony\Component\Console\Command\Command;
 
 class ThemeService
 {
@@ -43,6 +46,16 @@ class ThemeService
         return null;
     }
 
+    /**
+     * Register a new custom artisan command to be available.
+     */
+    public function registerCommand(Command $command)
+    {
+        Artisan::starting(function (Application $application) use ($command) {
+            $application->addCommands([$command]);
+        });
+    }
+
     /**
      * Read any actions from the set theme path if the 'functions.php' file exists.
      */