1
0
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:
Toby Zerner
2018-02-10 12:09:35 +10:30
parent aff1b9a5e4
commit 160493e725
31 changed files with 42 additions and 42 deletions

View File

@@ -51,7 +51,7 @@ class DeleteDiscussionHandler
$this->assertCan($actor, 'delete', $discussion);
$this->events->fire(
$this->events->dispatch(
new Deleting($discussion, $actor, $command->data)
);

View File

@@ -74,7 +74,7 @@ class EditDiscussionHandler
}
}
$this->events->fire(
$this->events->dispatch(
new Saving($discussion, $actor, $data)
);

View File

@@ -53,7 +53,7 @@ class ReadDiscussionHandler
$state = $discussion->stateFor($actor);
$state->read($command->readNumber);
$this->events->fire(
$this->events->dispatch(
new UserDataSaving($state)
);

View File

@@ -70,7 +70,7 @@ class StartDiscussionHandler
$actor
);
$this->events->fire(
$this->events->dispatch(
new Saving($discussion, $actor, $data)
);

View File

@@ -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')
);
});