Enable, Disable... and... Remove?
Ok, so I've been playing with the code base for a bit.
I noticed that the 'CssThemes' plugin cannot be disabled due to its database table (actually it is its content) not being cleaned up.
So, I am proposing to add another action to the Applications and Plugins (and possibly Themes, but I haven't gone through that bit yet), 'Remove'.
And add two more class methods, so the 'action' to 'method' mapping looks like:
Enable action -> Setup()
Disable action -> OnDisable()
Remove action -> CleanUp()
I *really* hope this is something that you core developers would like to see, as I have already started working on it.
Any thoughts?
P.S. It's 6:30AM here, I'm off to get some sleep. If all things go well, I will commit the changes to my Github fork and send you guys a pull request.
I noticed that the 'CssThemes' plugin cannot be disabled due to its database table (actually it is its content) not being cleaned up.
So, I am proposing to add another action to the Applications and Plugins (and possibly Themes, but I haven't gone through that bit yet), 'Remove'.
And add two more class methods, so the 'action' to 'method' mapping looks like:
Enable action -> Setup()
Disable action -> OnDisable()
Remove action -> CleanUp()
I *really* hope this is something that you core developers would like to see, as I have already started working on it.
Any thoughts?
P.S. It's 6:30AM here, I'm off to get some sleep. If all things go well, I will commit the changes to my Github fork and send you guys a pull request.
0
Comments
http://github.com/fredwu/Garden/commits/master
Plugins can now be removed, as well as having the new 'OnDisable()' and 'CleanUp()' methods.
My one comment is: Do you think you could call the SettingsController->Remove() method "RemoveAddon" instead? It's a little misleading when taken in the context of a "Settings Controller" to just call it "Remove". Know what I mean?