Possibility to customize the site root module of the page engine - Printable Version
+- Aria Templates Forums (http://ariatemplates.com/forum)
+-- Forum: Public forums (/forumdisplay.php?fid=3)
+--- Forum: Specifications (/forumdisplay.php?fid=13)
+--- Thread: Possibility to customize the site root module of the page engine (/showthread.php?tid=178)
Possibility to customize the site root module of the page engine - flongo - 10 February 2014 16:06
As soon as the page engine is started, an instance of class aria.pageEngine.SiteRootModule is used as the root module controller of the whole application. Whenever a common or page-specific module controller is declared in the site configuration or in a page definition, an instance of such module is loaded as submodule of the above-mentioned root controller.
The limit of this approach is that it is not possible to listen to submodule events and react to them, because the common parent module is hard-coded.
In order to allow developers to take advantage of the events mechanism, and more in general to add features that need to be placed in the root module controller, it is desirable to be able to customize it.
2. Technical solution
The technical solution proposed here consists in