mirror of
https://github.com/flarum/core.git
synced 2025-08-20 15:21:49 +02:00
Convert subscriber to listener, eliminating compat-style extender
This commit is contained in:
@@ -13,19 +13,9 @@ use Flarum\Likes\Event\PostWasLiked;
|
||||
use Flarum\Likes\Event\PostWasUnliked;
|
||||
use Flarum\Post\Event\Deleted;
|
||||
use Flarum\Post\Event\Saving;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
|
||||
class SaveLikesToDatabase
|
||||
{
|
||||
/**
|
||||
* @param Dispatcher $events
|
||||
*/
|
||||
public function subscribe(Dispatcher $events)
|
||||
{
|
||||
$events->listen(Saving::class, [$this, 'whenPostIsSaving']);
|
||||
$events->listen(Deleted::class, [$this, 'whenPostIsDeleted']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Saving $event
|
||||
*/
|
||||
|
Reference in New Issue
Block a user