[Koha-bugs] [Bug 19605] ILL backends should be pluggable through regular Koha plugins

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Mar 28 17:57:29 CET 2024


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

Pedro Amorim <pedro.amorim at ptfs-europe.com> changed:

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

--- Comment #35 from Pedro Amorim <pedro.amorim at ptfs-europe.com> ---
Created attachment 164088
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164088&action=edit
Bug 19605: Rename method and use the instantiated plugin in the call

This patch makes the backend instantiation happen through a plugin
object method instead of a static one. This way, the (already)
instantiated plugin can be reused (if needed) in the plugin workflow
like this:

sub new_il_backend {
    my ($self, $params) = @_;
    return Custom::Backend->new(
        {
            config => $params->{config},
            logger => $params->{logger},
            plugin => $self,
        }
    );
}

The passed plugin object would then be used to retrieve whatever
plugin-defined configurations, template paths or even helper methods. On
INN-Reach, it gives the backend access to API user agents, task queue
injection, etc.

This patch also renames the method so it is more straight-forward this is
related to ILL.

Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim at ptfs-europe.com>

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


More information about the Koha-bugs mailing list