-
Notifications
You must be signed in to change notification settings - Fork 2
/
extend.php
38 lines (30 loc) · 1.21 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
<?php
/**
* This file is part of nodeloc/flarum-ext-my-emoji.
*
* Copyright (c) 2021 Hasan Özbey
*
* LICENSE: For the full copyright and license information,
* please view the LICENSE file that was distributed
* with this source code.
*/
namespace Nodeloc\MyEmoji;
use Flarum\Extend;
use Nodeloc\MyEmoji\Api\Controllers;
return [
(new Extend\Frontend('forum'))
->css(__DIR__.'/less/forum.less')
->js(__DIR__.'/js/dist/forum.js'),
(new Extend\Frontend('admin'))
->css(__DIR__.'/less/admin.less')
->js(__DIR__.'/js/dist/admin.js'),
new Extend\Locales(__DIR__.'/locale'),
(new Extend\Formatter)
->configure(ConfigureTextFormatter::class),
(new Extend\Routes('api'))
->get('/nodeloc/myemoji', 'myemoji.list', Controllers\ListEmojisController::class)
->post('/nodeloc/myemoji', 'myemoji.create', Controllers\CreateEmojiController::class)
->post('/nodeloc/import-myemoji', 'myemoji.import', Controllers\ImportEmojiController::class)
->patch('/nodeloc/myemoji/{id}', 'myemoji.update', Controllers\UpdateEmojiController::class)
->delete('/nodeloc/myemoji/{id}', 'myemoji.delete', Controllers\DeleteEmojiController::class),
];