1
0
mirror of https://github.com/flarum/core.git synced 2025-07-28 20:20:34 +02:00

Fix class names

This commit is contained in:
Franz Liedke
2017-10-03 19:22:33 +02:00
parent 3fc150cd23
commit d528cd03e2
2 changed files with 17 additions and 17 deletions

View File

@@ -12,9 +12,9 @@
namespace Flarum\Mentions\Listener;
use Flarum\Formatter\Event\Configuring;
use Flarum\Formatter\Event\ConfiguringRenderer;
use Flarum\Forum\UrlGenerator;
use Flarum\Post\Post\CommentPost;
use Flarum\Formatter\Event\Rendering;
use Flarum\Http\UrlGenerator;
use Flarum\Post\CommentPost;
use Illuminate\Contracts\Events\Dispatcher;
class FormatPostMentions
@@ -38,7 +38,7 @@ class FormatPostMentions
public function subscribe(Dispatcher $events)
{
$events->listen(Configuring::class, [$this, 'configure']);
$events->listen(ConfiguringRenderer::class, [$this, 'render']);
$events->listen(Rendering::class, [$this, 'render']);
}
/**
@@ -69,11 +69,11 @@ class FormatPostMentions
}
/**
* @param ConfiguringRenderer $event
* @param Rendering $event
*/
public function render(ConfiguringRenderer $event)
public function render(Rendering $event)
{
$event->renderer->setParameter('DISCUSSION_URL', $this->url->toRoute('discussion', ['id' => '']));
$event->renderer->setParameter('DISCUSSION_URL', $this->url->to('forum')->route('discussion', ['id' => '']));
}
/**

View File

@@ -12,9 +12,9 @@
namespace Flarum\Mentions\Listener;
use Flarum\Formatter\Event\Configuring;
use Flarum\Formatter\Event\ConfiguringParser;
use Flarum\Formatter\Event\ConfiguringRenderer;
use Flarum\Forum\UrlGenerator;
use Flarum\Formatter\Event\Parsing;
use Flarum\Formatter\Event\Rendering;
use Flarum\Http\UrlGenerator;
use Flarum\User\UserRepository;
use Illuminate\Contracts\Events\Dispatcher;
@@ -46,8 +46,8 @@ class FormatUserMentions
public function subscribe(Dispatcher $events)
{
$events->listen(Configuring::class, [$this, 'configure']);
$events->listen(ConfiguringParser::class, [$this, 'parse']);
$events->listen(ConfiguringRenderer::class, [$this, 'render']);
$events->listen(Parsing::class, [$this, 'parse']);
$events->listen(Rendering::class, [$this, 'render']);
}
/**
@@ -73,19 +73,19 @@ class FormatUserMentions
}
/**
* @param ConfiguringParser $event
* @param Parsing $event
*/
public function parse(ConfiguringParser $event)
public function parse(Parsing $event)
{
$event->parser->registeredVars['userRepository'] = $this->users;
}
/**
* @param ConfiguringRenderer $event
* @param Rendering $event
*/
public function render(ConfiguringRenderer $event)
public function render(Rendering $event)
{
$event->renderer->setParameter('PROFILE_URL', $this->url->toRoute('user', ['username' => '']));
$event->renderer->setParameter('PROFILE_URL', $this->url->to('forum')->route('user', ['username' => '']));
}
/**