Creating a configuration page for our module and adding a Symfony form
If you want your module line on the Improve | Modules | Module manager BO page to contain a Configure button in the drop-down list on the right-hand side of the line, you must add the getContent()
method to your main module class. This method should return the content of the configuration page.
If you go back to Figure 9.2 in the first section of this chapter, you will see what we want. First, we want to create a Symfony form that allows the user to set the maximum number of hours before being called back by customer services. As we are not providing a full lesson on how to create a form with Symfony, just remember that PrestaShop provides a Form Builder service. It requires two arguments to work and generate your Symfony form: a data provider, which will retrieve and provide all the data to fill the inputs, and a form type, to define the form structure with the list of inputs.
First, let’s focus on...