2013-10-25

Печать всех событий Magento

Для печати всех событий мадженто:
  $eventAreas = array('global', 'frontend', 'adminhtml');
  foreach ($eventAreas as $eventArea) {
   $eventConfig = Mage::app()->getConfig()
    ->getNode(sprintf('%s/events', $eventArea));
   foreach ($eventConfig->children() as $key => $value) {
    foreach ($value->observers->children() as $key1 => $value1) {
     $observer_method = array((string)$eventArea,
      (string)$key,
      (string)$key1,
      (string)Mage::app()->getConfig()
       ->getModelClassName($value1->class),
      (string)$value1->method);
     echo $observer_method[1]."</br>";
    }
   }
  }

No comments:

Post a Comment