mirror of
https://github.com/flarum/core.git
synced 2025-08-10 10:24:46 +02:00
fire -> dispatch
As per Illuminate\Contracts\Events\Dispatcher
This commit is contained in:
@@ -51,7 +51,7 @@ class DeleteDiscussionHandler
|
||||
|
||||
$this->assertCan($actor, 'delete', $discussion);
|
||||
|
||||
$this->events->fire(
|
||||
$this->events->dispatch(
|
||||
new Deleting($discussion, $actor, $command->data)
|
||||
);
|
||||
|
||||
|
@@ -74,7 +74,7 @@ class EditDiscussionHandler
|
||||
}
|
||||
}
|
||||
|
||||
$this->events->fire(
|
||||
$this->events->dispatch(
|
||||
new Saving($discussion, $actor, $data)
|
||||
);
|
||||
|
||||
|
@@ -53,7 +53,7 @@ class ReadDiscussionHandler
|
||||
$state = $discussion->stateFor($actor);
|
||||
$state->read($command->readNumber);
|
||||
|
||||
$this->events->fire(
|
||||
$this->events->dispatch(
|
||||
new UserDataSaving($state)
|
||||
);
|
||||
|
||||
|
@@ -70,7 +70,7 @@ class StartDiscussionHandler
|
||||
$actor
|
||||
);
|
||||
|
||||
$this->events->fire(
|
||||
$this->events->dispatch(
|
||||
new Saving($discussion, $actor, $data)
|
||||
);
|
||||
|
||||
|
@@ -82,7 +82,7 @@ class DiscussionPolicy extends AbstractPolicy
|
||||
$query->where(function ($query) use ($actor) {
|
||||
$query->where('discussions.is_private', false)
|
||||
->orWhere(function ($query) use ($actor) {
|
||||
$this->events->fire(
|
||||
$this->events->dispatch(
|
||||
new ScopeModelVisibility($query, $actor, 'viewPrivate')
|
||||
);
|
||||
});
|
||||
@@ -109,7 +109,7 @@ class DiscussionPolicy extends AbstractPolicy
|
||||
$query->where('comments_count', '>', 0)
|
||||
->orWhere('start_user_id', $actor->id)
|
||||
->orWhere(function ($query) use ($actor) {
|
||||
$this->events->fire(
|
||||
$this->events->dispatch(
|
||||
new ScopeModelVisibility($query, $actor, 'editPosts')
|
||||
);
|
||||
});
|
||||
|
Reference in New Issue
Block a user