View | Details | Raw Unified | Return to bug 24786
Collapse All | Expand All

(-)a/Koha/Template/Plugin/Registers.pm (-2 / +31 lines)
Lines 17-22 package Koha::Template::Plugin::Registers; Link Here
17
# You should have received a copy of the GNU General Public License
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
=head1 NAME
21
22
Koha::Template::Plugin::Registers
23
24
=head1 DESCRIPTION
25
26
The Registers plugin is a helper that returns register related session information for templates
27
28
=head1 SYNOPSIS
29
30
    [% USE Registers %]
31
    [% SET registers = Registers.all() %]
32
    [% SET registers = Registers.all( { filters => { current_branch => 1 } } );
33
34
=cut
35
20
use Modern::Perl;
36
use Modern::Perl;
21
37
22
use Template::Plugin;
38
use Template::Plugin;
Lines 26-31 use C4::Koha; Link Here
26
use C4::Context;
42
use C4::Context;
27
use Koha::Cash::Registers;
43
use Koha::Cash::Registers;
28
44
45
=head1 FUNCTIONS
46
47
=head2 session_register_id
48
49
Return the register_id for the register attached to the current session.
50
51
=cut
52
29
sub session_register_id {
53
sub session_register_id {
30
    my ($self) = @_;
54
    my ($self) = @_;
31
55
Lines 34-39 sub session_register_id { Link Here
34
        '';
58
        '';
35
}
59
}
36
60
61
=head2 session_register_name
62
63
Return the register_name for the register attached to the current session.
64
65
=cut
66
37
sub session_register_name {
67
sub session_register_name {
38
    my ($self) = @_;
68
    my ($self) = @_;
39
69
Lines 42-48 sub session_register_name { Link Here
42
      : '';
72
      : '';
43
}
73
}
44
74
45
=head2
75
=head2 all
46
76
47
    [% SET registers = Registers.all() %]
77
    [% SET registers = Registers.all() %]
48
    [% SET registers = Registers.all( { filters => { current_branch => 1 } } );
78
    [% SET registers = Registers.all( { filters => { current_branch => 1 } } );
49
- 

Return to bug 24786