Hi guys, haven't posted here in a while, but I've been working with Orchard on pretty much a daily basis.
I have a question for anyone who might be able to answer this.
I'd like to know if there is a way in Orchard right now to react to your module being disabled (and/or enabled) and doing some cleanup.
My use case is this:
My module contains a custom content part. When my module is enabled, I'd like to go into some of the default content types (such as Page, BlogPost, etc.) and add my part to those types. And when my module is disabled, I'd like to do the reverse.
Right now I could add some manual setup steps, such as create install and uninstall buttons in the admin for the user to press after enabling the module or before disabling the module, but there is always the possibility that someone can forget.
I've seen some modules try to do some of the "enable" steps in the migration, but that has two problems: 1. no chance to symmetrically disable these, and 2. the steps are not run again when the module is reenabled later.
If anyone can provide information, thanks =)