I'm creating a YII application containing multiple modules. Each module contains a FrontendController
and a BackendController
.
Now I have functionality shared by all of these modules, like a customizable Facebook share button. The share button should have a text and a title which can be edited inside the backend. And then is displayed in the module frontend.
The best scenario would be adding two lines to each controller, resulting in another settings tab in the backend and rendering a share button inside the frontend.
I've looked into PHP Traits which could add the functionality to the controllers, but I still need extra models, etc.