I am trying to override the helper file of XYZ component and for this I have created a system plugin using these documentation -



How to override core classes?

My plugin is working fine and its giving me the values but only problem is - the plugin is loading before the component.

I am using onAfterRoute event for this and also tried some other events such as onAfterInitialise, onAfterDispatch, onAfterRender.

What should I do now to load my plugin after the component?

1 Answer 1


I am not sure why onAfterRender is not working for you. Below is some alternate way.

Create your own custom plugin of custom type instead of system plugin say for example customgroup.

Once you installed your plugin, you can invoke your plugin using dispatcher.

JPluginHelper::importPlugin( 'customgroup' );
$dispatcher = JEventDispatcher::getInstance();
$results = $dispatcher->trigger( 'onMyEventName', array( &$param1, &$param2));

The above code will trigger onMyEventName in your plugin class PlgCustomgroupSomeplugin. Use this code at the end of request in your component.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.