mirror of
https://github.com/flarum/core.git
synced 2025-10-22 12:16:07 +02:00
fire -> dispatch
As per Illuminate\Contracts\Events\Dispatcher
This commit is contained in:
@@ -50,7 +50,7 @@ class DeletePostHandler
|
||||
|
||||
$this->assertCan($actor, 'delete', $post);
|
||||
|
||||
$this->events->fire(
|
||||
$this->events->dispatch(
|
||||
new Deleting($post, $actor, $command->data)
|
||||
);
|
||||
|
||||
|
@@ -78,7 +78,7 @@ class EditPostHandler
|
||||
}
|
||||
}
|
||||
|
||||
$this->events->fire(
|
||||
$this->events->dispatch(
|
||||
new Saving($post, $actor, $data)
|
||||
);
|
||||
|
||||
|
@@ -95,7 +95,7 @@ class PostReplyHandler
|
||||
$post->time = new DateTime($time);
|
||||
}
|
||||
|
||||
$this->events->fire(
|
||||
$this->events->dispatch(
|
||||
new Saving($post, $actor, $command->data)
|
||||
);
|
||||
|
||||
|
@@ -70,7 +70,7 @@ class PostPolicy extends AbstractPolicy
|
||||
$query->where(function ($query) use ($actor) {
|
||||
$query->where('posts.is_private', false)
|
||||
->orWhere(function ($query) use ($actor) {
|
||||
$this->events->fire(
|
||||
$this->events->dispatch(
|
||||
new ScopeModelVisibility($query, $actor, 'viewPrivate')
|
||||
);
|
||||
});
|
||||
|
Reference in New Issue
Block a user