Creating a modern BO controller containing a grid to list all the requests
As customer service members may need to review the saved callback requests, we need a new page in the BO of our PrestaShop. Let’s use Symfony to create a brand-new BO controller the modern way.
Creating a modern admin controller
Let’s create a BO admin controller in our module. The standard process for this starts with the creation of a class extending the FrameworkBundleAdminController
class in the src/Controller
folder of your module.
To apply this process to our module, let’s create the /modules/whcallback/src/Controller/AdminWHCallbackRequestController
file. While there is no specification for the naming of a controller, it is important to use a comprehensive one anyway. A good practice could be to prefix it with Admin
because of its BO destination and to suffix it with Controller
because it is a BO controller.
The newly created controller will contain the following code...