Override remove entities link on module uninstall page

by amit   Last Updated June 29, 2020 21:07 PM

When a module needs to be uninstalled, Drupal adds links indicating there is content associated with the module which should be deleted first and provides a link Remove module_name entities. This works fine for most modules, however we have a complex module that needs to perform clean up, is there a way to override this link and have it invoke a custom entity deletion method?

In our case the Remove links that are automatically added to the module uninstall page, don't end up cleaning all items, and leave the site in bad state.

Possibly related to this question asked earlier "How to remove custom module provided entity instances by the time the module being uninstalled?"

Tags : 8 entities

Related Questions

How to create a custom template for entities?

Updated April 07, 2015 03:03 AM

Drupal 8 Custom Entities from a UI?

Updated July 14, 2015 15:03 PM