wieder ohne extensionid
This commit is contained in:
parent
a6d6230553
commit
2696fa4dfd
31
extend.php
31
extend.php
|
|
@ -1,35 +1,19 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This file is part of blomstra/search.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2022 Blomstra Ltd.
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE.md
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Sbp\Search;
|
|
||||||
|
|
||||||
use Flarum\Extend as Flarum;
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
(new Flarum\ServiceProvider())->register(Provider::class),
|
(new Flarum\ServiceProvider())->register(Provider::class),
|
||||||
|
|
||||||
(new Flarum\Frontend('forum'))
|
(new Flarum\Frontend('forum'))
|
||||||
->js(__DIR__.'/js/dist/forum.js')
|
->js(__DIR__.'/js/dist/forum.js'),
|
||||||
->extensionId('sbp-search'),
|
|
||||||
(new Flarum\Frontend('admin'))
|
(new Flarum\Frontend('admin'))
|
||||||
->js(__DIR__.'/js/dist/admin.js')
|
->js(__DIR__.'/js/dist/admin.js')
|
||||||
->css(__DIR__.'/resources/less/admin.less')
|
->css(__DIR__.'/resources/less/admin.less'),
|
||||||
->extensionId('sbp-search'),
|
|
||||||
|
|
||||||
new Flarum\Locales(__DIR__.'/resources/locale'),
|
new Flarum\Locales(__DIR__.'/resources/locale'),
|
||||||
|
|
||||||
(new Flarum\Routes('api'))
|
(new Flarum\Routes('api'))
|
||||||
->get('/sbp/search/{type}', 'sbp.search', Api\Controllers\SearchController::class)
|
->get('/sbp/search/{type}', 'sbp.search', Api\Controllers\SearchController::class)
|
||||||
->put('/sbp/search/index', 'sbp.search.index', Api\Controllers\IndexController::class),
|
->put('/sbp/search/index', 'sbp.search.index', Api\Controllers\IndexController::class),
|
||||||
|
|
||||||
(new Flarum\Console())
|
(new Flarum\Console())
|
||||||
->command(Commands\BuildCommand::class),
|
->command(Commands\BuildCommand::class),
|
||||||
|
|
||||||
|
|
@ -39,5 +23,10 @@ return [
|
||||||
->default('blomstra-search.min-search-length', Commands\BuildCommand::DEFAULT_MIN_SEARCH_LENGTH)
|
->default('blomstra-search.min-search-length', Commands\BuildCommand::DEFAULT_MIN_SEARCH_LENGTH)
|
||||||
->default('blomstra-search.stem-exclusion', '')
|
->default('blomstra-search.stem-exclusion', '')
|
||||||
->serializeToForum('blomstraSearchMinLength', 'blomstra-search.min-search-length', 'intval')
|
->serializeToForum('blomstraSearchMinLength', 'blomstra-search.min-search-length', 'intval')
|
||||||
->serializeToForum('blomstraSearchPostBodies', 'blomstra-search.search-post-bodies', fn ($v) => (bool) $v, true),
|
->serializeToForum(
|
||||||
|
'blomstraSearchPostBodies',
|
||||||
|
'blomstra-search.search-post-bodies',
|
||||||
|
fn ($v) => (bool) $v,
|
||||||
|
true
|
||||||
|
),
|
||||||
];
|
];
|
||||||
Loading…
Reference in New Issue