Updating JEventDispatcher triggers

by user101289   Last Updated July 10, 2019 04:10 AM

Can anyone explain or point me to information on the new way to handle events in Joomla 4? I'm updating a component that uses triggers to display plugins, and it looks like this:

$dispatcher = JEventDispatcher::getInstance();
$dispatcher->trigger('onBeforeRenderToolbar', array($settings));

In Joomla 4 this throws an error that there's no JEventDispatcher class-- but the new Joomla\Event\Dispatcher stuff doesn't make much sense to me and doesn't seem to have the same methods. The docs at https://docs.joomla.org/Supporting_plugins_in_your_component have not been updated to support the new syntax.

Thanks for any help.



Related Questions


Updated January 06, 2019 18:10 PM

Updated May 28, 2017 04:10 AM

Updated November 08, 2016 08:04 AM

Updated September 17, 2016 08:06 AM