I've got a function I want to run on page save/ publish if certain custom CMS fields have been changed.
For example:
class Foo extends DataObjectDecorator {
public function updateCMSFields() {
$fields->addFieldsToTab("Root.Content", array(
new NumericField('Bar', 'Change me and save this page to trigger FooBar function')
));
}
}
function FooBar(){
//Do things
//With stuff
}
Any ideas?