...
This method is used to activate and set up modules. The two shown are pretty much essential. Lynicon has a very powerful module API allowing for extension of its functions in a composable and controllable way. The documentation contains a list of standard modules.
At the stage of RegisterModules, no routing has been set up: therefore we do not yet know what the content data types are, ContentTypeHierarchy has not yet been populated, and the Data API is not ready for use.
...