Magento – Constructor for Magento Controller

controllersmodule

I need constructor or init function that can be run for my custom module. I need to call it every time when request made to my module's controller in magento.

Best Answer

You can add following function to use your logic to your custom module's controller:

   protected function _construct()
    {
        // your logic of construct
    }

I hope this will help

Related Topic