Closed MegaphoneJon closed 6 years ago
ill work on cleaning these up this week!
Do you feel like someone who disables and enables the application should have any functionality trigger?
No - disable/enable don't typically change the installed data. A good user story for disable/enable is "I think there's a bug in this extension that's causing a problem elsewhere in CiviCRM, let me turn it off for a minute to test". They would expect to be able to re-enable and resume where they left off.
Someone who uninstalls would ideally like all traces of the extension removed. This is particularly important because the extension won't reinstall cleanly in its current state.
makes sense to me - i merged some code which will delete everything installed, adds code blocks to the functions and the install functions, and moves all this behavior into the install hook.
This looks good! With one exception of a typo, which I've submitted a PR for in #11.
Hi Andy,
I know you're done, but you said you'd be available for bugfixes. Let me know if you think this isn't something you'll get to.
In the code I noticed a couple of things about these two functions.
hook_civicrm_install
.install groupid
creates the custom field group and field; I haven't investigated whatinstall_matching
does, but if you could add a docblock, it would help future maintainers of the code.hook_civicrm_uninstall
should have functions that reverse these functions (e.g. delete the custom field and group).Thanks, Jon