1
0
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:
Toby Zerner
2015-08-13 12:55:48 +09:30
parent ee2497f300
commit 6123773001
3 changed files with 12 additions and 16 deletions

View File

@@ -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()
{
//
}
}