mirror of
https://github.com/flarum/core.git
synced 2025-07-21 00:31:17 +02:00
Move logic to Extension class
The gathering and execution of extenders can actually be done here in the `Extension` class. This way, the `ExtensionManager` only deals with the question of which extensions are enabled, the `Extension` class actually extends the core application, and the service provider simply calls a method, without having to know about internals.
This commit is contained in:
@@ -24,11 +24,7 @@ class ExtensionServiceProvider extends AbstractServiceProvider
|
||||
$this->app->bind('flarum.extensions', ExtensionManager::class);
|
||||
|
||||
$this->app->booting(function (Container $app) {
|
||||
$extenders = $app->make('flarum.extensions')->getActiveExtenders();
|
||||
|
||||
foreach ($extenders as $extender) {
|
||||
$extender($app);
|
||||
}
|
||||
$app->make('flarum.extensions')->extend($app);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user