pneumatig Posted May 15, 2014 Share Posted May 15, 2014 Hi, simple (?) question - how to cancel module uninstall in ___uninstall method? Return false doesn't work, should I throw some kind of Exception? Link to comment Share on other sites More sharing options...
Raymond Geerts Posted May 15, 2014 Share Posted May 15, 2014 ___uninstall is hookable. You could write a before hook that will replace the uninstall This example is for $this->pages but you can change that to your needs public function init() { $this->pages->addHookBefore('uninstall', $this, 'myUninstall'); } public function myUninstall(HookEvent $event) { // replace original method $event->replace = true; } 1 Link to comment Share on other sites More sharing options...
pneumatig Posted May 15, 2014 Author Share Posted May 15, 2014 Worked great thx 1 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