-
Notifications
You must be signed in to change notification settings - Fork 3
/
extend.php
55 lines (44 loc) · 2.17 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
namespace Nearata\EmbedVideo;
use Flarum\Api\Serializer\DiscussionSerializer;
use Flarum\Extend;
use Flarum\Api\Serializer\ForumSerializer;
use Flarum\Post\Event\Saving;
use Nearata\EmbedVideo\Api\Serializer\DiscussionSerializerAttributes;
use Nearata\EmbedVideo\Api\Serializer\ForumSerializerAttributes;
use Nearata\EmbedVideo\Command\PurgeCommand;
use Nearata\EmbedVideo\Formatter;
use Nearata\EmbedVideo\Post\Listener\SavingListener;
return [
(new Extend\Frontend('forum'))
->js(__DIR__.'/js/dist/forum.js')
->css(__DIR__.'/less/forum.less'),
(new Extend\Frontend('admin'))
->js(__DIR__.'/js/dist/admin.js')
->css(__DIR__.'/less/admin.less'),
new Extend\Locales(__DIR__ . '/locale'),
(new Extend\Formatter)
->configure(Formatter\Configure::class)
->render(Formatter\Render::class),
(new Extend\Event)
->listen(Saving::class, SavingListener::class),
(new Extend\ApiSerializer(ForumSerializer::class))
->attributes(ForumSerializerAttributes::class),
(new Extend\ApiSerializer(DiscussionSerializer::class))
->attributes(DiscussionSerializerAttributes::class),
(new Extend\Console())
->command(PurgeCommand::class),
(new Extend\Settings)
->default('nearata-embed-video.admin.settings.video_type.dash', false)
->default('nearata-embed-video.admin.settings.video_type.flv', false)
->default('nearata-embed-video.admin.settings.video_type.hls', false)
->default('nearata-embed-video.admin.settings.video_type.shaka', false)
->default('nearata-embed-video.admin.settings.video_type.webtorrent', false)
->default('nearata-embed-video.admin.settings.options.airplay', false)
->default('nearata-embed-video.admin.settings.options.hotkey', false)
->default('nearata-embed-video.admin.settings.options.quality_switching', false)
->default('nearata-embed-video.admin.settings.options.theme', '')
->default('nearata-embed-video.admin.settings.options.logo', '')
->default('nearata-embed-video.admin.settings.options.lang', 'en')
->default('nearata-embed-video.admin.settings.options.modal_enabled', false)
];