-
Notifications
You must be signed in to change notification settings - Fork 1
/
extend.php
26 lines (23 loc) · 938 Bytes
/
extend.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
namespace Long\HideMe;
use Flarum\Api\Event\Serializing;
use Flarum\Discussion\Event\Saving as DiscussionSaving;
use Flarum\Extend;
use Flarum\Post\Event\Saving as PostSaving;
use Illuminate\Contracts\Events\Dispatcher;
use Long\HideMe\Listener\AddForumUserRelationship;
return [
(new Extend\Frontend('admin'))
->js(__DIR__ . '/js/dist/admin.js'),
(new Extend\Frontend('forum'))
->js(__DIR__ . '/js/dist/forum.js')
->css(__DIR__ . '/less/forum.less'),
new Extend\Locales(__DIR__ . '/locale'),
new \Long\HideMe\Extend\Settings(),
function (Dispatcher $events) {
$events->listen(PostSaving::class, Listener\PostSavingListener::class);
$events->listen(DiscussionSaving::class, Listener\DiscussionSavingListener::class);
$events->listen(Serializing::class, Listener\SerializingListener::class);
$events->subscribe(AddForumUserRelationship::class);
}
];