]> BookStack Code Mirror - bookstack/blobdiff - app/Theming/ThemeService.php
Aligned notification capitalisation
[bookstack] / app / Theming / ThemeService.php
index 602abaf1c5a35e4845cbde67aec8981071271f5c..275dc9d8c94d421fa4af8467e98146e73fa4404b 100644 (file)
@@ -3,6 +3,9 @@
 namespace BookStack\Theming;
 
 use BookStack\Auth\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.
      */