Bug 23091: Move _Restore to Koha::Item store trigger
[koha.git] / C4 / Labels / Template.pm
blob890c77d1bf673e40f6d52311486a569df8547ea4
1 package C4::Labels::Template;
3 use strict;
4 use warnings;
6 use base qw(C4::Creators::Template);
8 use autouse 'Data::Dumper' => qw(Dumper);
11 use constant TEMPLATE_TABLE => 'creator_templates';
13 __PACKAGE__ =~ m/^C4::(.+)::.+$/;
14 my $me = $1;
16 sub new {
17 my $self = shift;
18 push @_, "creator", $me;
19 return $self->SUPER::new(@_);
22 sub retrieve {
23 my $self = shift;
24 push @_, "table_name", TEMPLATE_TABLE, "creator", $me;
25 return $self->SUPER::retrieve(@_);
28 sub delete {
29 my $self = shift;
30 push @_, "table_name", TEMPLATE_TABLE, "creator", $me;
31 return $self->SUPER::delete(@_);
34 sub save {
35 my $self = shift;
36 push @_, "table_name", TEMPLATE_TABLE, "creator", $me;
37 return $self->SUPER::save(@_);