Skip to content

Conversation

kristiansp
Copy link
Contributor

@kristiansp kristiansp commented Aug 13, 2020

When using behaviors to handle events, event won't fire when it is called with the static method, as the behavior is added dynamically, but when using this->trigger() it will, so I suggest to trigger it from the object itself. (If there's no specific reason to do it otherwise, perhaps all event triggers could be changed in the same way.)

Fixes #730

When using behaviors to handle events, event won't fire when it is called with the static method, as the behavior is added dynamically.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use $this->trigger() instead of Event::trigger() to make it possible to listen to events in Behaviors

1 participant