From ca96d3b6e7660588947ccde884d596fea467e1f1 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 10 May 2024 10:26:21 -0300 Subject: [PATCH] Bug 34978: Add new parameters to POD Signed-off-by: Tomas Cohen Arazi --- Koha/Plugins.pm | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Koha/Plugins.pm b/Koha/Plugins.pm index f7efc14d386..c8a02ed7055 100644 --- a/Koha/Plugins.pm +++ b/Koha/Plugins.pm @@ -261,12 +261,31 @@ sub GetPlugins { =head2 InstallPlugins -Koha::Plugins::InstallPlugins( [ verbose => 1 ] ) + my $plugins = Koha::Plugins->new(); + $plugins->InstallPlugins( + { + [ verbose => 1, + include => ( 'Koha::Plugin::A', ... ), + exclude => ( 'Koha::Plugin::X', ... ), ] + } + ); 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. +Parameters: + +=over 4 + +=item B: A list of class names to exclude from the process. + +=item B: A list of class names to limit the process to. + +=item B: Print useful information. + +=back + NOTE: We reload all plugins here as a protective measure in case someone has removed a plugin directly from the system without using the UI -- 2.45.0