We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Nested Modules

Does Phalcon support nested modules?



98.9k

What do you mean by nested modules? submodules? subdirectories for controllers?

edited Aug '14

I mean submodules, so for example I would like to make (Comments Module) which must encapsulate everything related to comments system and be reusable, so inside this module I need 2 submodules:

1- Frontend that I may want it to render or return HTML or JSON

2- Backend where the comments manager will access as a tool to manage users comments.

So anytime I can use this ready modular system in any other application.



7.9k

you can use phalcon component https://docs.phalcon.io/en/latest/api/Phalcon_Mvc_User_Component.html

As for view you can intercept view event before render and inject your own view to main view

Looking forward to get an answer on this one