mirror of
https://github.com/flarum/core.git
synced 2025-07-31 13:40:20 +02:00
New listen API
Event subscriptions now take place before *any* boot method is called. This ensures that all event listeners are registered before things happen – e.g. locales are registered before the translator is instantiated in the Tags extension's boot method.
This commit is contained in:
@@ -5,23 +5,8 @@ use Illuminate\Events\Dispatcher;
|
||||
|
||||
class Extension extends BaseExtension
|
||||
{
|
||||
/**
|
||||
* Bootstrap the application events.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot(Dispatcher $events)
|
||||
public function listen(Dispatcher $events)
|
||||
{
|
||||
$events->subscribe('{{namespace}}\Listeners\AddClientAssets');
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user