FEATURE: prepare class structure for menu widget.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Handlers\Registrators\MenuExtensionRegistrator;
|
||||
use App\Handlers\Registrators\SearchEngineRegistrator;
|
||||
use App\Handlers\Registrators\SettingsExtensionRegistrator;
|
||||
use App\Handlers\Registrators\TemplateRegistrator;
|
||||
@@ -11,6 +12,8 @@ use App\Handlers\Search\Files;
|
||||
use App\Handlers\Search\Presenters\AdminContent as AdminContentPresenter;
|
||||
use App\Handlers\Search\Presenters\AdminFiles;
|
||||
use App\Widgets\HtmlCode\HtmlCode;
|
||||
use App\Widgets\Menu\Extensions\URL;
|
||||
use App\Widgets\Menu\Menu;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
@@ -49,6 +52,10 @@ class AppServiceProvider extends ServiceProvider
|
||||
return new WidgetRegistrator($app);
|
||||
});
|
||||
|
||||
$this->app->singleton('registerMenuExtension', function ($app) {
|
||||
return new MenuExtensionRegistrator($app);
|
||||
});
|
||||
|
||||
// create registrator for template directories
|
||||
$this->app->singleton('registerTemplateDir', function ($app) {
|
||||
return new TemplateRegistrator($app);
|
||||
@@ -75,6 +82,11 @@ class AppServiceProvider extends ServiceProvider
|
||||
|
||||
// register all available widgets
|
||||
$registrator->register(HtmlCode::class);
|
||||
$registrator->register(Menu::class);
|
||||
|
||||
// register some menu extensions
|
||||
$menuExtensions = $this->app->make('registerMenuExtension');
|
||||
$menuExtensions->register(new URL());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user