在Magento 1中,我可以通过如下所示的调试dispatchEvent()
方法获取事件/观察者列表Mage.php
。
/**
* Dispatch event
*
* Calls all observer callbacks registered for this event
* and multiple observers matching event name pattern
*
* @param string $name
* @param array $data
* @return Mage_Core_Model_App
*/
public static function dispatchEvent($name, array $data = array())
{
Mage::log($name,null,'Events');
Varien_Profiler::start('DISPATCH EVENT:'.$name);
$result = self::app()->dispatchEvent($name, $data);
Varien_Profiler::stop('DISPATCH EVENT:'.$name);
return $result;
}
在magento 2中,我可以获取事件/观察者列表吗?