This question is specifically for the Content joomla plugin.
You can fire any plugin event in your component.
Here is an example of triggering a Content plugin onPrepareContent .
$content = new stdClass; $content->text = 'Your content body with proper tag or content wich you want to replace. For example: {loadmodule mod_login}'; $atricle = array(); JPluginHelper::importPlugin('content'); $dispatcher = JDispatcher::getInstance(); JDispatcher::getInstance()->trigger( 'onPrepareContent', array( &$content, &$atricle, null ) );
Or if you want to run only a specific plugin for your component, you can use
JPluginHelper::importPlugin('content', 'loadmodule');
The second argument is the name of the plugin you want to use.
Similarly, you can trigger a user plugin event in your component.
JPluginHelper::importPlugin('user', 'contactcreator'); JDispatcher::getInstance()->trigger( 'onUserAfterSave', array( $user, $isnew, $success, $msg ) );
source share