Generating table views by using Grid components
To find a good example of the use of a Grid component, please go to https://www.domainname.ext/adminXXX/backoffice/index.php/configure/shop/contacts/?_token=abcdef1234
with adminXXX
replaced by your admin folder name or via the BO menu in Shop Parameters | Contact.
It displays the list of the existing contact recipients available to your customers via the contact front controller. We will focus on how the table can be created with the help of a Grid component.
The definition of the controller managing this view is in the /src/PrestaShopBundle/Controller/Admin/Configure/ShopParameters/ContactsController.php
file. We can open it and look at the indexAction(Request $request, ContactFilters $
filters)
definition:
public function indexAction(Request $request, ContactFilters $filters) { $contactGridFactory = $this ->get('prestashop.core.grid...