Magento Certified Developer GuideCategory: 1. BasicsWhat is the structure of event observers, and how are properties accessed therein
Manish Prakash Staff asked 5 years ago

The method which we define in observer model, gets a parameter of type ‘Varien_Event’

e.g

class Excellence_Test_Model_Observer{
 public function testMethod($event){
     $arg1 = $event->getEvent()->getObject1();
     $eventName = $event->getEvent()->getName();
 }
}