Discovering how a legacy-based BO controller works
We learned in Chapter 3, The Front Office, that all the controllers were children of the Controller
class and studied the features added by the FrontController
class. For BO controllers, we will follow the same steps, but as we know the life cycle of a Controller
class, we won’t repeat the explanation, and instead, we will dive directly inside the specificities of BO controllers.
We will use a practical example by exploring the AdminCart
controller, which is accessible in the BO of PrestaShop inside the Orders Menu , from the Shopping Carts link. The URL structure of this controller uses the following pattern: https://www.domainname.ext/adminXXX/index.php?controller=AdminCarts&token=abcdef1234
.
As we saw in Chapter 2, Configuration and Initialization of PrestaShop, the legacy-based BO controllers are instantiated by the Dispatcher
if no routes are found by the Symfony router. In that case, Dispatcher
manages the initialization...