All posts by Pramod T P

Magento 2 Routing Rewrite Controller

We can rewrite controller with the help of router. Magento provides the attribute before/after to config the module sort order which define what module controller will be find first.

For example, if we want to rewrite the controller customer/account/login, we will define more route in the route.xml like this: Continue reading Magento 2 Routing Rewrite Controller


Magento 2 Events

As you have heard, Magento 2 is using the events driven architecture which will help too much to extend the Magento functionality. We can understand this event as a kind of flag that rises when a specific situation happens. .

Dispatch event

In Magento 2 Events List, we can use the class Magento\Framework\Event\Manager to dispatch event. For example, we create a controller action in PHPCodez_First to show the word “Hello World” on the screen: Continue reading Magento 2 Events