[Koha-bugs] [Bug 28026] Add a 'call_recursive' method to Koha::Plugins

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Aug 13 18:17:06 CEST 2021


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

Tomás Cohen Arazi <tomascohen at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #123789|0                           |1
        is obsolete|                            |

--- Comment #34 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 123829
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123829&action=edit
Bug 28026: Add call_recursive() as a supplement for call()

The method call() is not sufficient for all plugin hook types. It's
possible that more than one plugin will be installed that wants to
return the arguaments passed in an updated form.  These transformation
plugins need to work recursively rather than independantly.

This patch adss a `call_recursive()` method that takes the output of
the first plugin and uses it as the input for the next plugin and so
on. This allowes each plugin to see the current version of the arguament
list and modify it as necessary.

Test plan
1/ Run the included tests - t/db_dependent/Koha/Plugins/Plugins.t

Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list