17 August 2011 at 8:02am
Just letting anyone whose interested know I came across this post: http://silverstripe.org/general-questions/show/12197
One thing I am unsure about though....
If I add an onAfterWrite function into my decorator, how do I call the Member DataObject's native onAfterWrite function first? Those examples use parent::onAfterWrite();.....but I thought it would have been $this->owner->onAfterWrite(); ?
20 August 2011 at 8:18pm
You don't need to call parent::onBeforeWrite() (or after) in any decorators as the actual function (onBeforeWrite) will already be the callee. You only need to explicitly call it when you're subclassing a dataobject (not decorating)