-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextend.php
49 lines (39 loc) · 1.64 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
<?php
namespace Kilowhat\Audit;
use Flarum\Extend;
return [
(new Extend\Frontend('admin'))
->js(__DIR__ . '/js/dist/admin.js')
->css(__DIR__ . '/resources/less/admin.less'),
(new Extend\Routes('api'))
->get('/kilowhat-audit/logs', 'kilowhat-audit.index', Controllers\AuditIndexController::class),
new Extend\Locales(__DIR__ . '/resources/locale'),
(new Extend\Middleware('forum'))
->add(Middlewares\SetLoggerActor::class),
(new Extend\Middleware('admin'))
->add(Middlewares\SetLoggerActor::class),
(new Extend\Middleware('api'))
->add(Middlewares\SetLoggerActor::class),
new Extenders\CoreDiscussionEvents(),
new Extenders\CorePostEvents(),
new Extenders\CoreUserEvents(),
new Extenders\FlarumApprovalEvents(),
new Extenders\FlarumFlagsEvents(),
new Extenders\FlarumLockEvents(),
new Extenders\FlarumNicknamesEvents(),
new Extenders\FlarumStickyEvents(),
new Extenders\FlarumSuspendEvents(),
new Extenders\FlarumTagsEvents(),
(new Extend\SimpleFlarumSearch(Search\AuditSearcher::class))
->setFullTextGambit(Search\Gambits\NoOpFullTextGambit::class)
->addGambit(Search\Gambits\ActionGambit::class)
->addGambit(Search\Gambits\ActorGambit::class)
->addGambit(Search\Gambits\ClientGambit::class)
->addGambit(Search\Gambits\DiscussionGambit::class)
->addGambit(Search\Gambits\IpGambit::class)
->addGambit(Search\Gambits\UserGambit::class),
(new Extend\Console())
->command(Console\ClearLogsCommand::class),
(new Extend\ServiceProvider())
->register(LoggerServiceProvider::class),
];