Newer
Older
map / extend.php
@Réz István Réz István on 9 Nov 2021 1 KB first commit
<?php

/*
 * This file is part of justoverclock/flarum-ext-contactme.
 *
 * Copyright (c) 2021 Marco Colia.
 *
 * For the full copyright and license information, please view the LICENSE.md
 * file that was distributed with this source code.
 */

namespace Ubuntuhu\Map;

use Flarum\Api\Serializer\ForumSerializer;
use Flarum\Extend;
use Flarum\Api\Serializer\CurrentUserSerializer;
use Ubuntuhu\Map\Api\Controller\ContactController;

return [
    (new Extend\Frontend('forum'))
        ->js(__DIR__.'/js/dist/forum.js')
        ->css(__DIR__.'/resources/less/forum.less')
        ->route('/map', 'ubuntuhu/map'),
    (new Extend\Frontend('admin'))
        ->js(__DIR__.'/js/dist/admin.js')
        ->css(__DIR__.'/resources/less/admin.less'),
    (new Extend\Routes('forum'))
        ->post('/sendmail', 'ubuntuhu.sendmail', ContactController::class),
    new Extend\Locales(__DIR__.'/resources/locale'),
    (new Extend\ApiSerializer(ForumSerializer::class))
        ->attributes(Listeners\LoadSettingsFromDatabase::class),
];