mirror of
https://github.com/flarum/core.git
synced 2025-06-20 09:50:47 +02:00
Use new extenders for bootstrapping
This commit is contained in:
@ -9,9 +9,11 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Flarum\Markdown\Listener;
|
use Flarum\Extend;
|
||||||
use Illuminate\Contracts\Events\Dispatcher;
|
use s9e\TextFormatter\Configurator;
|
||||||
|
|
||||||
return function (Dispatcher $events) {
|
return [
|
||||||
$events->subscribe(Listener\FormatMarkdown::class);
|
new Extend\FormatterConfiguration(function (Configurator $config) {
|
||||||
};
|
$config->Litedown;
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
@ -17,11 +17,6 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^0.1.0-beta.6"
|
"flarum/core": "^0.1.0-beta.6"
|
||||||
},
|
},
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Flarum\\Markdown\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "0.1.x-dev"
|
"dev-master": "0.1.x-dev"
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
<?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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Flarum\Markdown\Listener;
|
|
||||||
|
|
||||||
use Flarum\Formatter\Event\Configuring;
|
|
||||||
use Illuminate\Contracts\Events\Dispatcher;
|
|
||||||
|
|
||||||
class FormatMarkdown
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param Dispatcher $events
|
|
||||||
*/
|
|
||||||
public function subscribe(Dispatcher $events)
|
|
||||||
{
|
|
||||||
$events->listen(Configuring::class, [$this, 'addMarkdownFormatter']);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Configuring $event
|
|
||||||
*/
|
|
||||||
public function addMarkdownFormatter(Configuring $event)
|
|
||||||
{
|
|
||||||
$event->configurator->Litedown;
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user