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