From f50a6ece8386058a5778d46458821064412c5f01 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 13 Feb 2018 14:08:25 -0500 Subject: [PATCH] Bug 20181: Add POD for new plugin Signed-off-by: Mark Tompsett Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- Koha/Template/Plugin/KohaPlugins.pm | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Koha/Template/Plugin/KohaPlugins.pm b/Koha/Template/Plugin/KohaPlugins.pm index a2b9e2997b..a6822ca691 100644 --- a/Koha/Template/Plugin/KohaPlugins.pm +++ b/Koha/Template/Plugin/KohaPlugins.pm @@ -23,6 +23,29 @@ use base qw( Template::Plugin ); use Koha::Plugins; +=head1 NAME + +Koha::Template::Plugin::KohaPlugins - A module for adding hooks into Koha for plugins + +=head1 DESCRIPTION + +This plugin contains functions related to adding plugin hooks into various parts +of Koha. + +To use, include the line '[% USE KohaPlugins %]' at the top of the template +to enable the plugin + +=head2 Methods + +=head3 get_plugins_opac_head + +[% KohaPlugins.get_plugins_opac_head %] + +This method collects the output of all plugins with an opac_head method +to output to the head section of opac pages. + +=cut + sub get_plugins_opac_head { return q{} unless C4::Context->preference('UseKohaPlugins') @@ -39,6 +62,15 @@ sub get_plugins_opac_head { return join( "\n", @data ); } +=head3 get_plugins_opac_js + +[% KohaPlugins.get_plugins_opac_js %] + +This method collects the output of all plugins with an opac_js method +to output to the javascript section of at the bottom of opac pages. + +=cut + sub get_plugins_opac_js { return q{} unless C4::Context->preference('UseKohaPlugins') -- 2.39.5