Plugins and application information is detailed in the system report. Is it possible to get my module to list itself there? And if not, is there somewhere else in the CMS to see modules that a registered and working?
1 Answer
This isn't something that is built-in, probably the cleanest way would be to write a plugin that adds a Utility that lists your installed modules.
You can see all of the installed modules via:
Craft::$app->modules
...but keep in mind that this will include all of your plugins as well, since they are modules, too. You can exclude them by doing something like:
foreach (Craft::$app->modules as $module) {
if (!is_a($module, Plugin::class)) {
// This is some kind of module that isn't a plugin
}
}
Note that this will include other things like the yii\debug\Module
and even craft\web\Application
too.
If you want to see just the loaded modules for the current request, you can do:
Craft::$app->loadedModules
(not all modules may be loaded for each request)
-
Thanks Andrew! It would be nice to be able to hook into the System Report page from a plugin to add additional information there, but this is a good option. I've also submitted a feature request as recommended by Brad. Nov 22, 2018 at 14:10