1
public function someObserver($observer) {

    Mage::dispatchEvent('some_event', ?);

}

What do we need to have instead of a ?? $observer? But it expects array. I want the observer that catches some_event to have the same values as someObserver does.

3
  • Have you tried passing array('observer'=>$observer) there?
    – Dmytro
    Feb 16, 2015 at 10:53
  • yes, but then you need to do getObserver(), not sure if that's good @DmitryR
    – tmm
    Feb 16, 2015 at 10:58
  • I think it's usual way of getting data from Magento's object instance - via getters. Not sure if that's bad.
    – Dmytro
    Feb 16, 2015 at 11:06

1 Answer 1

4

You could try something like this:

public function someObserver($observer)
{
    Mage::dispatchEvent('some_event', $observer->getEvent()->getData());
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.