Updating JEventDispatcher triggers

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

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


Develop a System Plugin with Sample Data for Options

Updated January 06, 2019 18:10 PM

How to remove rel="nofollow" with Joomla Buffer?

Updated May 28, 2017 04:10 AM