Hi!
I'm working in a module. It has a front controller for making some processes through URL calls.
Now, I want to use some methods of this controller from its parent module (directly, not getting a URL link). But I don't know how to get an instance of my front controller from the module class.
I'll put some brief coding to better explain:
My module:
class MyModule extends Module
{
public function __construct()
{
$this->name = 'mymodule';
$this->controllers = array('myFrontController');
[...]
}
}
And now my controller:
class MyFrontControllerModuleFrontController extends ModuleFrontController
{
public function initContent()
{
[...]
}
protected function myOwnProcess()
{
[...]
}
}
The goal is to execute myOwnProcess() from my module, and this is why I first need to get an instance to the controller object (and I don't know how to get this).
Any help? Thanks in advance.