Widget_Controller for different types of data (MVC)
- by steve-o
Hello, I have a few widgets I need to show on a site - they are all relating to different types of data (e.g user, house). Each type of data and its relations is represented in specific models, but as far as a controller or helper is concerned, is it an ok plan to have a generic Widget controller/helper which generates the necessary widgets, even though each widget is dealing with distinct data? I don't really want to generate these widgets within the User and House controllers, as these controllers are dealing with different types of functionality.
I'd imagine that the Widget_Controller could just contain static methods for generating these widgets, e.g:
Widget_Controller::user_panel();
Does that make sense? Cheers!