From 0a2ffaae03df77f8b29bd64cce9195f4ca069f40 Mon Sep 17 00:00:00 2001 From: Andrew Fuerste Henry Date: Mon, 16 Mar 2026 13:35:40 +0000 Subject: [PATCH] Bug 39781: Add POD coverage Signed-off-by: Juliet Heltibridle Signed-off-by: Martin Renvoize (cherry picked from commit 5937d40a280a739bd07baeda0b5f5c02bc184b32) Signed-off-by: Jacob O'Mara --- Koha/Template/Plugin/NoticeTemplates.pm | 45 +++++++++++++++---------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/Koha/Template/Plugin/NoticeTemplates.pm b/Koha/Template/Plugin/NoticeTemplates.pm index 8cb5545c50..43762c242b 100644 --- a/Koha/Template/Plugin/NoticeTemplates.pm +++ b/Koha/Template/Plugin/NoticeTemplates.pm @@ -26,6 +26,27 @@ use Koha::Notice::Templates; use C4::Context; use C4::Letters qw( GetLettersAvailableForALibrary ); +=head1 NAME + +Koha::Template::Plugin::NoticeTemplates - TT Plugin for notice templates + +=head1 SYNOPSIS + +[% USE NoticeTemplates %] + +[% NoticeTemplates.GetByModule('members') %] + +[% NoticeTemplates.GetByModuleForLibrary('members') %] + +=head1 ROUTINES + +=head2 GetByModule + +In a template, you can get notice templates by module with +[% letters = NoticeTemplates.GetByModule( 'members' ) %] + +=cut + sub GetByModule { my ( $self, $module ) = @_; @@ -39,6 +60,13 @@ sub GetByModule { ); } +=head2 GetByModuleForLibrary + +In a template, you can get notice templates by module, limited to only templates for all librries or for the user's logged-in branch, with +[% letters = NoticeTemplates.GetByModuleForLibrary( 'members' ) %] + +=cut + sub GetByModuleForLibrary { my ( $self, $module ) = @_; my $userenv = C4::Context->userenv; @@ -57,23 +85,6 @@ sub GetByModuleForLibrary { ); } -=head1 NAME - -Koha::Template::Plugin::NoticeTemplates - TT Plugin for notice templates - -=head1 SYNOPSIS - -[% USE NoticeTemplates %] - -[% NoticeTemplates.GetByModule('members') %] - -=head1 ROUTINES - -=head2 GetByModule - -In a template, you can get notice templates by module with -[% letters = NoticeTemplates.GetByModule( 'members' ) %] - =head1 AUTHOR Alex Arnaud