File: | C4/Labels/Template.pm |
Coverage: | 61.9% |
line | stmt | bran | cond | sub | time | code |
---|---|---|---|---|---|---|
1 | package C4::Labels::Template; | |||||
2 | ||||||
3 | 2 2 2 | 24 16 59 | use strict; | |||
4 | 2 2 2 | 36 16 127 | use warnings; | |||
5 | ||||||
6 | 2 2 2 | 21 15 156 | use base qw(C4::Creators::Template); | |||
7 | ||||||
8 | 2 2 2 | 38 30 54 | use autouse 'Data::Dumper' => qw(Dumper); | |||
9 | ||||||
10 | BEGIN { | |||||
11 | 2 2 2 2 | 235 28 44 145 | use version; our $VERSION = qv('1.0.0_1'); | |||
12 | } | |||||
13 | ||||||
14 | 2 2 2 | 123 22 47 | 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; |