3

I need to call an extension or module method from a plugin.

Anyone know how to do that?

Eventually solved with this code:

include_once(PATH_THIRD.'extension/mod.extension.php');
$this->EE->load->add_package_path(PATH_THIRD.'extension/'); 
$ext = new Extensionclass();
$PI = $ext->extension_function($params);

1 Answer 1

4

You can do it with the following example code within your plugin:

require_once PATH_THIRD."modulename/modulefilename";
$obj = new ModuleClass();
$obj->module_method();

Hope, it would help you.

1
  • Similar to how I eventually figure it out. Thanks.
    – MB34
    Jul 16, 2013 at 21:47

Your Answer

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

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