The init() hook won't work, because it's called before the plugin's database is initialized.
The afterFormSave() hook doesn't seem to be called at all in a plugin, but maybe I'm doing it wrong. Or maybe it has been removed, I can't find any mention of it anywhere except in the documentation.
The post() hook seems to work, but I don't know if that's intended to be used.
In other words, in your plugin, you'd have this:
Code: Select all
public function post() {
// do what you need to do here
// ..
// call parent method
parent::post();
}