Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Event API?

Go to End

2 Posts   1493 Views


Community Member, 1 Post

21 February 2008 at 6:36am

Edited: 21/02/2008 6:39am

Does the Silverstripe CMS offers some kind of events API something like OnSaveContent, OnUserUpdate, OnContentUpdate et cetera?

The purpose of this is to allow me to have a piece of code that will triggered by these event hooks for instance when a cms editor updates a content, i want some kind of email to fire to a specific person.


Forum Moderator, 801 Posts

24 February 2008 at 6:55pm

hm, good idea - currently we don't have this functionality.
you can work with Page->onBeforeWrite()/onBeforeDelete() etc.
we might have a suitable concept with DataObjectDecorator (e.g. Versioned.php) in which you could hook additional functionality without having to subclass - but all pretty low-level stuff as it stands.