New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modules Manager action hooks for module cleanup #7150
Conversation
- new class to include in modules directory root called by Laminas Module Mananger
@adunsulag If you get a chance before you disappear tomorrow could you take a look at this concept. |
btw: not finished with cleanup |
if ($request->getPost('modAction') == "enable") { | ||
$status = $this->EnableModule($request->getPost('modId')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What the heck! This is backwards. enable actually disables the module and disable enables in the controller functions.
Appears interface is reporting the actions button name and not what it is supposed to do!
I guess while here I'll fix this but gesh all I wanted was to add the hooks and not go traipsing all over Laminas!!!
- document new listener class
class ModuleManagerActionListener | ||
{ | ||
// Prevent instantiation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bradymiller Do we have somewhere to put this file perhaps we have example module somewhere.
…action in the controller.
It is always an adventure when I look into the Laminas module code!:) |
…le_manager * 'master' of https://github.com/openemr/openemr: fix: escaping custom templates used with ckeditor (openemr#7152)
- implement fax sms clean up methods - add new method for listener save globals
This button does the same as Default Install. I'm missing something. Looking for upgrade path maybe from disabled. I need to reassign the Install SQL button to an upgrade sql script or patch maybe so we track version. |
What do you think about using events? |
Hi @zerai Thanks for the comment! Still I'm not married to current and may change my mind upon further research. I'm happy to take input on either. |
Figured out sql upgrade. Kind of a roundabout way to do this. I think we'll/I'll need to change how we version modules.
The above is pretty close but Upgrade SQL doesn't currently render view after action plus other bugs. We still probably have a few custom module pathing issues. Currently I trigger module listener action after the Laminas action however I wonder if it would be better to trigger listener action before Laminas action! Any feedback here? |
- fix sql action path for custom_module - new fetch module setup method - fix upgrade button to show when needed - restyle Module Manager - bump faxsms sql version to 3.1.0 - add faxsms sql upgrade sql
merging soon. tired of this!:) |
Anyone have suggestions on workflow to do an auto upgrade on module bootstrap from ModuleLoader. |
Develop and implement trait class for convientence functions like handling get, post, session plus more supers. develop laminas get registry settings in abstract class
Does it ever end!!! I still want to go ahead and style the other care modules to at least follow our themes bg and text colors. It would have been nice to have some companionship for this project because it is more enjoyable doing these tedious projects where ideas can be bounced around and at minimum vane some interest..... I don't know if I will do more or not. I hope this process is not too hard for people to catch onto but I may put a period on it for now and merge and test on dev demo later.. |
* Modules Manager action hooks for module cleanup - new class to include in modules directory root called by Laminas Module Mananger * - refactor class name to be better decription - document new listener class * - refactor interface button action function arguement to reflect the action in the controller. * - rename new class again so it is somewhat unique. - implement fax sms clean up methods - add new method for listener save globals * - fix SMS notification cli adding run arguments * - create and refactor abstract class to extend in module listener. - fix sql action path for custom_module - new fetch module setup method - fix upgrade button to show when needed - restyle Module Manager - bump faxsms sql version to 3.1.0 - add faxsms sql upgrade sql * - add column to install sql. * Finish new abstract class for module manager actions Develop and implement trait class for convientence functions like handling get, post, session plus more supers. develop laminas get registry settings in abstract class * style * - more restyles (cherry picked from commit 901fba1)
Fixes #7147