File: | C4/Labels/Template.pm |
Coverage: | 61.9% |
line | stmt | bran | cond | sub | time | code |
---|---|---|---|---|---|---|
1 | package C4::Labels::Template; | |||||
2 | ||||||
3 | 1 1 1 | 23 18 40 | use strict; | |||
4 | 1 1 1 | 21 18 54 | use warnings; | |||
5 | ||||||
6 | 1 1 1 | 19 15 121 | use base qw(C4::Creators::Template); | |||
7 | ||||||
8 | 1 1 1 | 4 1 21 | use autouse 'Data::Dumper' => qw(Dumper); | |||
9 | ||||||
10 | BEGIN { | |||||
11 | 1 1 1 1 | 92 1 6 59 | use version; our $VERSION = qv('1.0.0_1'); | |||
12 | } | |||||
13 | ||||||
14 | 1 1 1 | 34 2 8 | use constant TEMPLATE_TABLE => 'creator_templates'; | |||
15 | ||||||
16 | __PACKAGE__ =~ m/^C4::(.+)::.+$/; | |||||
17 | my $me = $1; | |||||
18 | ||||||
19 | sub new { | |||||
20 | 0 | my $self = shift; | ||||
21 | 0 | push @_, "creator", $me; | ||||
22 | 0 | return $self->SUPER::new(@_); | ||||
23 | } | |||||
24 | ||||||
25 | sub retrieve { | |||||
26 | 0 | my $self = shift; | ||||
27 | 0 | push @_, "table_name", TEMPLATE_TABLE, "creator", $me; | ||||
28 | 0 | return $self->SUPER::retrieve(@_); | ||||
29 | } | |||||
30 | ||||||
31 | sub delete { | |||||
32 | 0 | my $self = shift; | ||||
33 | 0 | push @_, "table_name", TEMPLATE_TABLE, "creator", $me; | ||||
34 | 0 | return $self->SUPER::delete(@_); | ||||
35 | } | |||||
36 | ||||||
37 | sub save { | |||||
38 | 0 | my $self = shift; | ||||
39 | 0 | push @_, "table_name", TEMPLATE_TABLE, "creator", $me; | ||||
40 | 0 | return $self->SUPER::save(@_); | ||||
41 | } | |||||
42 | ||||||
43 | 1; |