helper file overrider is not working

0

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

https://docs.joomla.org/J1.5:Plugin/Events/System

and

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?

Joomler

Posted 2016-06-01T14:23:41.363

Reputation: 1 676

Answers

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.

Nagarjun

Posted 2016-06-01T14:23:41.363

Reputation: 2 801