In the previous chapter, we created a Magento entity that was linked to a database table. In this recipe, we will create a backend interface so that backend users can see the data from this table in the backend.
We will create an overview that will use the standard backend grid widget of Magento. This widget is widely used in the backend to display information in a grid as the Manage Products page.
For this recipe, we have to configure a backend controller, a menu item, an ACL, and the right Block
files to render the grid output. Prepare yourselves to extend the backend with a custom grid.
The first thing we have to do is to create a backend controller for our grid. We will create a grid based on the subscription entity, so we will create
SubscriptionController
. Create aSubscriptionController.php
file in theapp/code/local/Packt/Helloworld/controllers/Adminhtml/Helloworld/
folder.Add the following content in the controller:
...