Magento中eventprefix在Observer中发送的对象是什么?

时间:2012-02-17 12:46:13

标签: events magento

我想知道事件eventprefix中观察者发送的对象的类型。例如,在事件中:

<customer_save_bebore>
    <observers>
        <identifycustomer>
            <type>singleton</type>
            <class>Identifycustomer_Model_observer</class>
            <method>customerRegistration</method>
            </identifycustomer>
    </observers>
</customer_save_bebore>

在Magento的代码中搜索我在app / code / core / Model / Abstract中找到了这个

 protected function _beforeSave()
{
    if (!$this->getId()) {
        $this->isObjectNew(true);
    }
    Mage::dispatchEvent('model_save_before', array('object'=>$this));
    Mage::dispatchEvent($this->_eventPrefix.'_save_before', $this->_getEventData());
    return $this;
}

此外,我对在类型的事件中发送的对象感兴趣:

  • controller_action_predispatch
  • controller_action_posdispatch

谢谢!

0 个答案:

没有答案