I have been wondering about this for a while. What if Magento has written a core Observer class and performs a functionality that you do not want it to execute, or you want to rewrite it? Is there a way to say, don’t use this method in an Observer, just use mine. If I setup a method for my own Observer won’t it just do the core functionality first and then whatever I have implement?
For example, Magento wants to save some data to the database in an Observer method, but I don’t want it to save that data at all, I want it to save some other data that I have added columns or attributes to the database for.
Standard caveat about class overrides being the last resort for implementing your own functionality
It’s probably possible to fiddle with the loading of the Magento global config to strip out a core Magento Observer, but there’s no supported way for doing it.
However, consider how the Core observers are configured.
Observers are Magento Model classes. If a Model’s been configured with the URI/path based syntax
as opposed to a full PHP class name
you can create an override for the Observer Model class (just as you can for any other Model). If a PHP class name’s been used, you’re out of luck. (You could place a local file in local/Mage/Widget/Model/Observer.php if you’re willing to take on the responsibility of maintenance, but I don’t recommend it)
So, to override the above observer, you would
Create a custom module that include an override for the class Mage_Widget_Model_Observer.
In your override class, either redeclare
prepareWidgetsPluginConfigto do what you want OR override the specific method. This could include a empty method to completely remove the functionality.