mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
a6a78d2ab5
Removed old pagination provider as url handling now achieved in a better way. Removed unused broadcast service provider. Moved view-based tweaks into specific provider. Reorganised provider config list.
35 lines
775 B
PHP
35 lines
775 B
PHP
<?php
|
|
|
|
namespace BookStack\Providers;
|
|
|
|
use BookStack\Theming\ThemeEvents;
|
|
use BookStack\Theming\ThemeService;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class ThemeServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
// Register the ThemeService as a singleton
|
|
$this->app->singleton(ThemeService::class, fn ($app) => new ThemeService());
|
|
}
|
|
|
|
/**
|
|
* Bootstrap services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
// Boot up the theme system
|
|
$themeService = $this->app->make(ThemeService::class);
|
|
$themeService->readThemeActions();
|
|
$themeService->dispatch(ThemeEvents::APP_BOOT, $this->app);
|
|
}
|
|
}
|