Bug 20181: Add POD for new plugin

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f50a6ece83)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Kyle M Hall 2018-02-13 14:08:25 -05:00 committed by Fridolin Somers
parent 54476ebd64
commit e761f5b95a
1 changed files with 32 additions and 0 deletions

View File

@ -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')