drupal函数:hook_modules_uninstalled-模块卸载

modules/system/system.api.php, 974行

版本
7
hook_modules_uninstalled($modules)

执行必要的行为在模块卸载后.

This function differs from hook_uninstall() as it gives all other modules a chance to perform actions when a module is uninstalled, whereas hook_uninstall() will only be called on the module actually being uninstalled.

It is recommended that you implement this module if your module stores data that may have been set by other modules.

同时参考

hook_uninstall()

参数

$modules The name of the uninstalled module.

相关主题

Hooks
Allow modules to interact with the Drupal core.

代码

<?php function hook_modules_uninstalled($modules) { foreach ($modules as $module) { db_delete('mymodule_table') ->condition('module', $module) ->execute(); } mymodule_cache_rebuild(); } ?>


同步内容