mirror of
https://github.com/flarum/core.git
synced 2025-10-26 13:16:11 +01:00
Rework extension bootstrapping
System JS modules don't execute when they're registered, so we need to import them explicitly. While we're at it, we may as well make the locale bootstrapper a module too.
This commit is contained in:
27
stubs/extension/src/Extension.php
Normal file
27
stubs/extension/src/Extension.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php namespace {{namespace}};
|
||||
|
||||
use Flarum\Support\Extension;
|
||||
use Illuminate\Events\Dispatcher;
|
||||
|
||||
class Extension extends BaseExtension
|
||||
{
|
||||
/**
|
||||
* Bootstrap the application events.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot(Dispatcher $events)
|
||||
{
|
||||
$events->subscribe('{{namespace}}\Listeners\AddClientAssets');
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user