Skip to content
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

Refactor module classes #1153

Merged
merged 10 commits into from
Apr 24, 2022
Merged

Refactor module classes #1153

merged 10 commits into from
Apr 24, 2022

Conversation

herrvigg
Copy link
Collaborator

@herrvigg herrvigg commented Apr 23, 2022

The module objects are very difficult to manipulate with simple arrays.

Reorganize the code for a much better structure:

  • QTX_Admin_Module: provides the basic static data (id, name, plugins, ...) and the built-in setup.
  • QTX_Admin_Module_Manager: manages the module state updates and notices
  • QTX_Admin_Module_Settings: holds the data relevant for the settings, mostly for display
  • QTX_Module_Loader: reads the state and loads modules (used by admin and front core)

Move files to modules folder to keep the related code together.

@herrvigg herrvigg added the modules Related to modules, internal to QTX label Apr 23, 2022
Copy link
Collaborator Author

@herrvigg herrvigg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactoring helps to have a complete different view.

modules/qtx_module_loader.php Outdated Show resolved Hide resolved
modules/qtx_module_loader.php Outdated Show resolved Hide resolved
@herrvigg herrvigg merged commit 3da12c5 into master Apr 24, 2022
@herrvigg herrvigg deleted the modules-classes branch April 24, 2022 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modules Related to modules, internal to QTX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant