RobertoV Posted June 28, 2021 Share Posted June 28, 2021 I'm developing a module integration with an existing module. Existing module has a ModuleAdminController with a public function like: class AdminExistingModuleController extends ModuleAdminController { public function functionA(){ . . . } } Then, I'm developing a module, which has a front controller like this: include_once _PS_MODULE_DIR_ . 'existingModule/controllers/admin/AdminExistingModuleController.php'; class DevelopingModuleFrontController extends ModuleFrontController { public function postProcess() { $controller=new AdminExistingModuleController(); $result=$controller->functionA(); exit($result); } } So, I need to call functionA() from DevelopingModuleFrontController. The code doesn't work giving a exception : Quote ContextErrorException Notice: Trying to get property 'id' of non-object in AdminController.php line 451 at AdminControllerCore->__construct()in AdminExistingModuleController.php line 187 How I can achive this? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now