Jump to content

How to cancel uninstall in module


pneumatig
 Share

Recommended Posts

___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;
}
  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...