Skip to content

Conversation

@Rahulsingh1939
Copy link
Collaborator

Issues Fixed

Testing Release build can be seen here : https://github.com/Rahulsingh1939/JA-Advanced-Migration-Tool/releases/tag/v0.9.0

@HermanPeeren
Copy link

HermanPeeren commented Oct 7, 2025

I was looking at the Dispatcher of the module and saw some strange things (like: not being extended from AbstractModuleDispatcher, and that require ModuleHelper at the end of the dispatch() method). Then I realised, that is how it is done in the tutorial I had referred to... I thought that tutorial was OK, but it appeared not to be. Sorry. The more it is clear that we need help getting the documentation up-to-date 🥴 . Please feel invited 😃

You can look at how it is done now in the Dispatchers of the core modules https://github.com/joomla/joomla-cms/tree/5.3-dev/modules . For mod_banners or instance https://github.com/joomla/joomla-cms/blob/5.3-dev/modules/mod_banners/src/Dispatcher/Dispatcher.php . You'll see:

  • the Dispatcher is extended from AbstractModuleDispatcher (which implements the DispatcherInterface = has a display() method). You generally don't write that display() method yourself, nor the constructor.
  • If you have a helper class, you call that via a HelperFactory. You do that by implementing the HelperFactoryAwareInterface by using the HelperFactoryAwareTrait.
  • You override the getLayoutData() method.
  • If you need a helper, you call $this->getHelperFactory()->getHelper etc.
  • you can call the Application object with $this->getApplication().

BTW, you can find an example of a module without a Helper class in mod_custom; look at how its Dispatcher is done (no HelperFactory needed there).

@genr8r genr8r merged commit 26ccdcc into joomla-projects:main Oct 8, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Module improvements Add Github actions for release builds

4 participants