gornycreative Posted November 4, 2022 Posted November 4, 2022 Hello, I'm working my admin.less into an admin style module and would like to break out .less files into a directory where the rule overrides required by the theme for any given module are only included when the module matching the name is selected. I figure there's no reason to include LESS definitions/overrides when a module is not being used on a site. I could pull a list of filenames that follow the convention /styles/modules/ModuleName.less and then run $modules->isInstalled() calls I guess, but I was wondering if there is a call that I am missing that returns an array of installed modules - either site or core that I can iterate on.
BitPoet Posted November 4, 2022 Posted November 4, 2022 You could call $modules->getModuleInfo('all', ['minify' => false]) and iterate over the results. Each entry has a "core" property and an "installed" property you can check. 3 1
gornycreative Posted November 6, 2022 Author Posted November 6, 2022 Awesome... I saw the list in the db in the cache table under modules.site but I was hoping it was easier to get. Duh the installed bool is sitting right there. I must have missed it.
Jonathan Lahijani Posted March 22, 2023 Posted March 22, 2023 How would I get a list of uninstalled/installable modules (or all modules whether installed or uninstalled)?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now