-
Notifications
You must be signed in to change notification settings - Fork 0
/
extend.php
33 lines (25 loc) · 1.05 KB
/
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
33
<?php
namespace Nearata\CakeDay;
use Flarum\Extend;
use Flarum\Api\Serializer\BasicUserSerializer;
use Flarum\Api\Serializer\ForumSerializer;
use Flarum\User\Filter\UserFilterer;
use Nearata\CakeDay\Api\Serializer\BasicUserSerializerAttributes;
use Nearata\CakeDay\Api\Serializer\ForumSerializerAttributes;
use Nearata\CakeDay\Filter\CakedayFilter;
use Nearata\CakeDay\Frontend\AnniversariesRoute;
return [
(new Extend\Frontend('forum'))
->js(__DIR__.'/js/dist/forum.js')
->css(__DIR__.'/less/forum.less')
->route('/anniversaries', 'nearata-cakeday.anniversaries', AnniversariesRoute::class),
(new Extend\Frontend('admin'))
->js(__DIR__.'/js/dist/admin.js'),
new Extend\Locales(__DIR__ . '/locale'),
(new Extend\ApiSerializer(ForumSerializer::class))
->attributes(ForumSerializerAttributes::class),
(new Extend\Filter(UserFilterer::class))
->addFilter(CakedayFilter::class),
(new Extend\ApiSerializer(BasicUserSerializer::class))
->attributes(BasicUserSerializerAttributes::class)
];