X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/1c43602f4bed60a84f47735ca8bc4a399018e013..refs/pull/3193/head:/app/Theming/ThemeService.php diff --git a/app/Theming/ThemeService.php b/app/Theming/ThemeService.php index 602abaf1c..275dc9d8c 100644 --- a/app/Theming/ThemeService.php +++ b/app/Theming/ThemeService.php @@ -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. */