This PR replaces PR #3105 which was based on outdated staging repository (over 2 years old). Update to current staging repository moved proposed patch from old J3.4 /libraries/joomla/document/html/renderer/modules.php to
/libraries/joomla/document/renderer/html/modules.php and test for this patch is located in /tests/unit/suites/libraries/joomla/document/renderer/html/JDocumentRendererHtmlModulesTest.php (to reflect new directory structure).
Updated patch is in branch 'patch-2' (kanich/joomla-cms)
Testing Instructions
Use Joomla unit test for running of /unit/suites/libraries/joomla/document/renderer/html/JDocumentRendererHtmlModulesTest.php. Successfull test run proves correct operation of JDocumentRendererHtmlModules class with proposed change - trigger of onAfterRenderModules event.
@wilsonge Yes both array parameters have to passed by reference to be able use these parameters in event processing code. See also :
Adds an onAfterRenderModule trigger #8296 abfc4ee
For page caching where cached page often contains several modules is this event used for getting latest module content also in case when the page content is still valid (non expired) in page cache. It is used e.g. for refreshing of ecommerce shopping cart on cached product page.
Please fix code style issues. Thanks.