From 1dc495dfdd062766fb3c6206aa44aa42e6de80e0 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Fri, 3 Jun 2016 11:03:17 +0930 Subject: [PATCH] Use new event name --- .../tags/src/Listener/AddClientAssets.php | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/extensions/tags/src/Listener/AddClientAssets.php b/extensions/tags/src/Listener/AddClientAssets.php index c6ce997d5..dffc1bcef 100755 --- a/extensions/tags/src/Listener/AddClientAssets.php +++ b/extensions/tags/src/Listener/AddClientAssets.php @@ -10,7 +10,7 @@ namespace Flarum\Tags\Listener; -use Flarum\Event\ConfigureClientView; +use Flarum\Event\ConfigureWebApp; use Flarum\Event\ConfigureForumRoutes; use Illuminate\Contracts\Events\Dispatcher; @@ -21,38 +21,38 @@ class AddClientAssets */ public function subscribe(Dispatcher $events) { - $events->listen(ConfigureClientView::class, [$this, 'addAssets']); + $events->listen(ConfigureWebApp::class, [$this, 'addAssets']); $events->listen(ConfigureForumRoutes::class, [$this, 'addRoutes']); } /** - * @param ConfigureClientView $event + * @param ConfigureWebApp $app */ - public function addAssets(ConfigureClientView $event) + public function addAssets(ConfigureWebApp $app) { - if ($event->isForum()) { - $event->addAssets([ + if ($app->isForum()) { + $app->addAssets([ __DIR__.'/../../js/forum/dist/extension.js', __DIR__.'/../../less/forum/extension.less' ]); - $event->addBootstrapper('flarum/tags/main'); + $app->addBootstrapper('flarum/tags/main'); } - if ($event->isAdmin()) { - $event->addAssets([ + if ($app->isAdmin()) { + $app->addAssets([ __DIR__.'/../../js/admin/dist/extension.js', __DIR__.'/../../less/admin/extension.less' ]); - $event->addBootstrapper('flarum/tags/main'); + $app->addBootstrapper('flarum/tags/main'); } } /** - * @param ConfigureForumRoutes $event + * @param ConfigureForumRoutes $routes */ - public function addRoutes(ConfigureForumRoutes $event) + public function addRoutes(ConfigureForumRoutes $routes) { - $event->get('/t/{slug}', 'tag'); - $event->get('/tags', 'tags'); + $routes->get('/t/{slug}', 'tag'); + $routes->get('/tags', 'tags'); } }