https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34713

--- Comment #1 from Marcel de Rooy <[email protected]> ---
(In reply to Pedro Amorim from comment #0)
> We should standardize the way plugin hooks are implemented and behave.

> Others are just called like:
> Some hooks return stuff (e.g. opac_detail_xslt_variables), others expect the
> param to be a ref and change in place without returning anything (e.g.
> patron_barcode_transform)

The ->call pattern is more recent. I think we should go in that direction.

> We already have hooks that behave like actions, and others that behave like
> filters.
> - Make it clear that a hook is either an action or a filter, either by name
> or by the way it's called

Not sure what you exactly mean with a filter here. But a plugin could modify or
just return results that allow further customization.
If you pass a ref to a plugin, you wont know what will happen. So you cant say
that it is just a filter or so? Passing that ref means that it may be changed.
Calling the plugin may lead to db changes too. The name is no protection..

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
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/

Reply via email to