hook_user_cancel_methods_alter

hook_user_cancel_methods_alter(&$methods) Modify account cancellation methods. By implementing this hook, modules are able to add, customize, or remove account cancellation methods. All defined methods are turned into radio button form elements by user_cancel_methods() after this hook is invoked. The following properties can be defined for each method: title: The radio button's title. description: (optional) A description to display on the confirmation form if the user is not allowed to s

hook_user_cancel

hook_user_cancel($edit, $account, $method) Act on user account cancellations. This hook is invoked from user_cancel() before a user account is canceled. Depending on the account cancellation method, the module should either do nothing, unpublish content, or anonymize content. See user_cancel_methods() for the list of default account cancellation methods provided by User module. Modules may add further methods via hook_user_cancel_methods_alter(). This hook is NOT invoked for the 'user_cancel_de

hook_update_status_alter

hook_update_status_alter(&$projects) Alter the information about available updates for projects. Parameters $projects: Reference to an array of information about available updates to each project installed on the system. See also update_calculate_project_data() Related topics Hooks Define functions that alter the behavior of Drupal core. File core/modules/update/update.api.php, line 85 Hooks provided by the Update Manager module. Code function hook_update_status_alter(&$projects)

hook_update_projects_alter

hook_update_projects_alter(&$projects) Alter the list of projects before fetching data and comparing versions. Most modules will never need to implement this hook. It is for advanced interaction with the Update Manager module. The primary use-case for this hook is to add projects to the list; for example, to provide update status data on disabled modules and themes. A contributed module might want to hide projects from the list; for example, if there is a site-specific module that doesn't h

hook_update_N

hook_update_N(&$sandbox) Perform a single update between minor versions. hook_update_N() can only be used to update between minor versions of a module. To upgrade between major versions of Drupal (for example, between Drupal 7 and 8), use the Migrate API instead. Naming and documenting your function For each change in a module that requires one or more actions to be performed when updating a site, add a new implementation of hook_update_N() to your mymodule.install file (assuming mymodule i

hook_update_last_removed

hook_update_last_removed() Return a number which is no longer available as hook_update_N(). If you remove some update functions from your mymodule.install file, you should notify Drupal of those missing functions. This way, Drupal can ensure that no update is accidentally skipped. Implementations of this hook should be placed in a mymodule.install file in the same directory as mymodule.module. Return value An integer, corresponding to hook_update_N() which has been removed from mymodule.instal

hook_update_dependencies

hook_update_dependencies() Return an array of information about module update dependencies. This can be used to indicate update functions from other modules that your module's update functions depend on, or vice versa. It is used by the update system to determine the appropriate order in which updates should be run, as well as to search for missing dependencies. Implementations of this hook should be placed in a mymodule.install file in the same directory as mymodule.module. Return value A mul

hook_updater_info_alter

hook_updater_info_alter(&$updaters) Alter the Updater information array. An Updater is a class that knows how to update various parts of the Drupal file system, for example to update modules that have newer releases, or to install a new theme. Parameters array $updaters: Associative array of updaters as defined through hook_updater_info(). Alter this array directly. See also drupal_get_updaters() hook_updater_info() Related topics Hooks Define functions that alter the behavior of Drupal c

hook_updater_info

hook_updater_info() Provide information on Updaters (classes that can update Drupal). Drupal\Core\Updater\Updater is a class that knows how to update various parts of the Drupal file system, for example to update modules that have newer releases, or to install a new theme. Return value An associative array of information about the updater(s) being provided. This array is keyed by a unique identifier for each updater, and the values are subarrays that can contain the following keys: class: The

hook_uninstall

hook_uninstall() Remove any information that the module sets. The information that the module should remove includes: state that the module has set using \Drupal::state() modifications to existing tables The module should not remove its entry from the module configuration. Database tables defined by hook_schema() will be removed automatically. The uninstall hook must be implemented in the module's .install file. It will fire when the module gets uninstalled but before the module's database ta