Comprofiler插件使用Joomla模型调用



如何在Joomla模型或控制器中调用comprofiler插件?

我试过这个:

global $_PLUGINS;
$_PLUGINS->trigger('onAfterUserUpdate', 'pul_getChanges', array(&$_POST, 1));

但它不起作用。

这是Joomla调用插件函数的方法

//Import the plugin that you need    
JPluginHelper::importPlugin('group', 'plugin_name');
//You have to instantiate JEventDispatcher class which will has trigger method to call that plugin function. 
JEventDispatcher::getInstance()->trigger(
'onAfterUserUpdate', 
array(
&$_POST, 
1
)
);

因此,在trigger函数中,它有两个参数,第一个是函数名称,第二个是以数组格式给出的参数数据。

最新更新