Widgetizing is a great method to use modules on different places in our applications. That's why this recipe will explain everything we need to know about doing this in the best way possible.
A working Zend Framework 2 skeleton application is needed to make full use of this recipe.
Widgets, they even sound great! We will explain in this recipe what they do and how they can be used.
We will create a small controller that will return some example comments, which are static and hardcoded for example only. First we should make sure we have a
Comment module, so we create the following directories and files:
module/ Comment/ config/ module.config.php src/ Comment/ Controller/ ...