加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
bootstrap.php 1.07 KB
一键复制 编辑 原始数据 按行查看 历史
Franz Liedke 提交于 2018-01-21 21:09 . Extender: List all assets explicitly
<?php
/*
* This file is part of Flarum.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Flarum\Extend;
use Flarum\Mentions\Listener;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Contracts\View\Factory;
return [
(new Extend\Assets('forum'))
->asset(__DIR__.'/js/forum/dist/extension.js')
->asset(__DIR__.'/less/forum/extension.less')
->bootstrapper('flarum/mentions/main'),
function (Dispatcher $events, Factory $views) {
$events->subscribe(Listener\AddPostMentionedByRelationship::class);
$events->subscribe(Listener\FormatPostMentions::class);
$events->subscribe(Listener\FormatUserMentions::class);
$events->subscribe(Listener\UpdatePostMentionsMetadata::class);
$events->subscribe(Listener\UpdateUserMentionsMetadata::class);
$events->subscribe(Listener\AddFilterByMentions::class);
$views->addNamespace('flarum-mentions', __DIR__.'/views');
},
];
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化