-
Notifications
You must be signed in to change notification settings - Fork 15
/
extend.php
executable file
·32 lines (25 loc) · 890 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
27
28
29
30
31
32
<?php
/* This is part of the jordanjay/flarum-ext-summaries project.
*
* Modified code (c)2019 Jordan Schnaidt
*
* Original code (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace JordanJay29\Summaries;
use Flarum\Api\Event\Serializing;
use Flarum\Extend;
use Illuminate\Contracts\Events\Dispatcher;
return [
(new Extend\Frontend('forum'))
->js(__DIR__ . '/js/dist/forum.js')
->css(__DIR__ . '/resources/less/forum/extension.less'),
(new Extend\Frontend('admin'))
->js(__DIR__ . '/js/dist/admin.js'),
(new Extend\Event())
->listen(Serializing::class, Listeners\LoadUserSettings::class),
function (Dispatcher $events) {
$events->subscribe(Listeners\AddApiAttributes::class);
}];