I'm working on a EVO plugin and I'm having a difficult time determining when system events are occurring and what is available when they fire. I've read through the API documentation, but I haven't found quite what I need.
Specifically, the plugin is going to update data in a related table that will track a group of tvs attached to a resource. The data from this table is applied to a sorting module I created, so that a resource can show up in multiple categories with a different (manually-determined) sort order.
Where I am currently having a problem is the creation of a new resource. According to the API docs, a new resource doesn't have an id until OnDocFormSave (which makes sense), but I'm not sure at what point during that event does the plugin 'OnDocFormSave' event fire. Is it before the resource gets saved or after.
If it's before, then how would I get the id to apply to my function or how do the tvs get the contentid when a resource is saved?
Any help is appreciated and if anyone knows a great resource for MODx plugin development, please let me know.
[ed. note: djad33 last edited this post 14 years, 3 months ago.]