https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26351 --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Kyle M Hall from comment #6)
In it's current state, the last plugin 'wins'. A couple solutions would be to: A) Modify call() to feed the result of the last plugin call into the next one B) Split the hooks into separate methods
I'm much more inclined to go with B. What do you think Julian?
I think A would not work in all cases. There can be more than one parameter and it's not necessarily the same thing as the return value. B would work in the example I mentioned, but would not work in other cases, like two plugins implementing the same method, one for transforming, the other for doing something else. I've seen a pattern somewhere else that could work : plugins modify directly the parameters my $params = { barcode => $barcode }; Koha::Plugins->call($hook_name, $params); $barcode = $params->{barcode}; It's not very intuitive, but it should work as expected in all cases, and there's no need to modify Koha::Plugins->call. -- You are receiving this mail because: You are watching all bug changes.