Jonathan Druart
3cfedcf238
perl -p -i -0 -e 's/BEGIN \{\n?\n?\}\n//' **/*.pm Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
40 lines
749 B
Perl
40 lines
749 B
Perl
package C4::Patroncards::Template;
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
use base qw(C4::Creators::Template);
|
|
|
|
use autouse 'Data::Dumper' => qw(Dumper);
|
|
|
|
|
|
use constant TEMPLATE_TABLE => 'creator_templates';
|
|
|
|
__PACKAGE__ =~ m/^C4::(.+)::.+$/;
|
|
my $me = $1;
|
|
|
|
sub new {
|
|
my $self = shift;
|
|
push @_, "creator", $me;
|
|
return $self->SUPER::new(@_);
|
|
}
|
|
|
|
sub retrieve {
|
|
my $self = shift;
|
|
push @_, "table_name", TEMPLATE_TABLE, "creator", $me;
|
|
return $self->SUPER::retrieve(@_);
|
|
}
|
|
|
|
sub delete {
|
|
my $self = shift;
|
|
push @_, "table_name", TEMPLATE_TABLE, "creator", $me;
|
|
return $self->SUPER::delete(@_);
|
|
}
|
|
|
|
sub save {
|
|
my $self = shift;
|
|
push @_, "table_name", TEMPLATE_TABLE, "creator", $me;
|
|
return $self->SUPER::save(@_);
|
|
}
|
|
|
|
1;
|