Edge_jr Posted May 18, 2015 Share Posted May 18, 2015 Hi, I have created new classes and controller for my module. I have written install function and I want to copy classes (root/classes) and controller (root/controllers/admin) How this will be written in install function. Any Idea? -Thanks Link to comment Share on other sites More sharing options...
Edge_jr Posted May 19, 2015 Author Share Posted May 19, 2015 (edited) I am expecting php copy function should work but not working. copy("./classes/MyModule.php","../../classes/MyModule.php"); copy("./controllers/admin/AdminMyModuleController.php","../../controllers/admin/AdminMyModuleController.php"); Any Idea? -Thanks Edited May 19, 2015 by edge82 (see edit history) Link to comment Share on other sites More sharing options...
Zohaib-fk Posted July 21, 2015 Share Posted July 21, 2015 (edited) Hi Edge, Prestashop has function Tools:Copy. This will helps to copy files same as php copy function. Edited June 10, 2021 by Zohaib-fk (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 21, 2015 Share Posted July 21, 2015 create own function: public function MyCopyFunction(){ // code to copy here if (copy==true){ return true; } else { return false; } } then inside install function you can use$this->myCopyFunction(); 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