https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066
Martin Renvoize <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #10 from Martin Renvoize <[email protected]> --- (In reply to Katrin Fischer from comment #7) > Please document on https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks > > Looking at the code and comparing with the similar after_item_action hooks I > wonder about the placement in the code. > > The implementation on bug 22709 adds the hooks before the logs are written, > this adds them after. > > I could imagine that plugins could actually change the data, so would result > in a different logging result. So I think "before" would be better. What do > you think? Hmmm, tl;dr I don't think 'before' or 'after' hooks should directly affect the data of the action. We probably want 'before' and 'after' hooks.. and maybe even an 'around'. Generally, a 'before' hook is for triggering actions prior to store (but not affecting the data for the store itself).. 'after' is for triggering actions after the store (like triggering zebraqueue.. again, it shouldn't affect the data of the store itself) and an around wraps the store and returns the updated data for the store to then act upon. At least, that's my vague understanding of 'before', 'after', 'around' in other frameworks? -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
