DOCUMENTATION

Search »

Uninstallation Method

The uninstallation functions work in a similar manner to the installation function. It's called when the administrator clicks the "UNINSTALL" link.

This function should contain all the custom code you need to execute to remove the module from the database and do whatever cleanup is required. Again, if your module made no database changes, then you won't need to include this file in your module.

The uninstall method is structured just like the install method:

The module ID is passed to the method in case you use it. Otherwise you can just ignore it.

The return array is necessary. You MUST return an array with two indexes: [0] true/false, and [1] a message. If you want the core script to display the default "The module has been uninstalled" message, just pass an empty string for the second index.