<<

NAME

Koha::Plugins - Module for loading and managing plugins.

call

Calls a plugin method for all enabled plugins

    @responses = Koha::Plugins->call($method, @args)

GetPlugins

This will return a list of all available plugins, optionally limited by method or metadata value.

    my @plugins = Koha::Plugins::GetPlugins({
        method => 'some_method',
        metadata => { some_key => 'some_value' },
    });

The method and metadata parameters are optional. Available methods currently are: 'report', 'tool', 'to_marc', 'edifact'. If you pass multiple keys in the metadata hash, all keys must match.

InstallPlugins

Koha::Plugins::InstallPlugins()

This method iterates through all plugins physically present on a system. For each plugin module found, it will test that the plugin can be loaded, and if it can, will store its available methods in the plugin_methods table.

NOTE: We re-load all plugins here as a protective measure in case someone has removed a plugin directly from the system without using the UI

AVAILABLE HOOKS

after_hold_create

Parameters

Return value

None

Example

    sub after_hold_create {
        my ($self, $hold) = @_;

        warn "New hold for borrower " . $hold->borrower->borrowernumber;
    }

AUTHOR

Kyle M Hall <kyle.m.hall@gmail.com>

<<