Drush

Use of Drupal module uninstall validators and lazy services

Sometimes we do not want users to uninstall a Drupal module directly, but instead want to perform some checks first.

Let's take a scenario where installing a custom module creates node types along with some fields. Later on If a user wishes to uninstall that module (assuming some content has already been created on the site using the node types that are created by this module), then uninstalling that module can cause a serious problem. It should ask the user to delete the content first that has been created on the site using these node types before uninstalling the module.

0/5