forked from FriendsOfFlarum/sitemap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
extend.php
41 lines (31 loc) · 1.12 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
<?php
/*
* This file is part of fof/sitemap.
*
* Copyright (c) 2020 FriendsOfFlarum.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*
*/
namespace FoF\Sitemap;
use Flarum\Extend;
use Flarum\Foundation\Application;
use FoF\Sitemap\Controllers\SitemapController;
use Illuminate\Contracts\Events\Dispatcher;
return [
new \FoF\Components\Extend\AddFofComponents(),
new \FoF\Console\Extend\EnableConsole(),
(new Extend\Frontend('admin'))
->js(__DIR__.'/js/dist/admin.js'),
(new Extend\Routes('forum'))
->get('/sitemap.xml', 'fof-sitemap-index', SitemapController::class),
new Extend\Locales(__DIR__.'/resources/locale'),
function (Application $app, Dispatcher $events) {
$app->register(Providers\ResourceProvider::class);
$app->register(Providers\ViewProvider::class);
$app->register(Providers\ConsoleProvider::class);
},
(new Extend\Console())->command(Commands\CacheSitemapCommand::class),
(new Extend\Console())->command(Commands\MultiPageSitemapCommand::class),
];