-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextend.php
45 lines (39 loc) · 1.38 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
<?php
/*
* This file is part of club-1/flarum-ext-sphinx-glossary.
*
* Copyright (c) 2023 Nicolas Peugnet.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
use Club1\SphinxGlossary\Console\SphinxAddCommand;
use Club1\SphinxGlossary\Console\SphinxListCommand;
use Club1\SphinxGlossary\Console\SphinxObjectsCommand;
use Club1\SphinxGlossary\Console\SphinxRemoveCommand;
use Club1\SphinxGlossary\Console\SphinxUpdateCommand;
use Club1\SphinxGlossary\Formatter\SphinxGlossaryConfigurator;
use Flarum\Extend;
use Flarum\Foundation\Paths;
use Illuminate\Console\Scheduling\Event;
return [
(new Extend\Formatter)
->configure(SphinxGlossaryConfigurator::class),
(new Extend\Console())
->command(SphinxAddCommand::class)
->command(SphinxRemoveCommand::class)
->command(SphinxListCommand::class)
->command(SphinxObjectsCommand::class)
->command(SphinxUpdateCommand::class)
->schedule('sphinx:update', function (Event $event) {
$event->daily();
}),
(new Extend\Filesystem)
->disk('club-1-sphinx-glossary', function (Paths $paths) {
return [
'root' => "$paths->storage/cache/club-1-sphinx-glossary",
];
}),
(new Extend\Frontend('forum'))
->css(__DIR__.'/css/forum.css'),
];