1
0
mirror of https://github.com/flarum/core.git synced 2025-10-12 07:24:27 +02:00
Files
php-flarum/stubs/extension/src/Extension.php
Toby Zerner 6123773001 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.
2015-08-13 12:55:48 +09:30

13 lines
286 B
PHP

<?php namespace {{namespace}};
use Flarum\Support\Extension as BaseExtension;
use Illuminate\Events\Dispatcher;
class Extension extends BaseExtension
{
public function listen(Dispatcher $events)
{
$events->subscribe('{{namespace}}\Listeners\AddClientAssets');
}
}