From 8d17717f0d40599a326b2343ddf09ecdcf3df2e1 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Sat, 28 Feb 2026 17:06:33 +0000 Subject: [PATCH] Bug 35104: Add Koha::Biblio::Metadata::Error(s) object classes Introduce Koha::Biblio::Metadata::Error and Koha::Biblio::Metadata::Errors as the Koha object layer over the new biblio_metadata_errors table. Sponsored-by: OpenFifth --- Koha/Biblio/Metadata/Error.pm | 38 +++++++++++++++++++++++++++ Koha/Biblio/Metadata/Errors.pm | 48 ++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 Koha/Biblio/Metadata/Error.pm create mode 100644 Koha/Biblio/Metadata/Errors.pm diff --git a/Koha/Biblio/Metadata/Error.pm b/Koha/Biblio/Metadata/Error.pm new file mode 100644 index 00000000000..37ecabb4781 --- /dev/null +++ b/Koha/Biblio/Metadata/Error.pm @@ -0,0 +1,38 @@ +package Koha::Biblio::Metadata::Error; + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +use Modern::Perl; + +use base qw(Koha::Object); + +=head1 NAME + +Koha::Biblio::Metadata::Error - Koha Biblio Metadata Error object class + +=head1 API + +=head2 Internal methods + +=head3 _type + +=cut + +sub _type { + return 'BiblioMetadataError'; +} + +1; diff --git a/Koha/Biblio/Metadata/Errors.pm b/Koha/Biblio/Metadata/Errors.pm new file mode 100644 index 00000000000..3fd752d2ab9 --- /dev/null +++ b/Koha/Biblio/Metadata/Errors.pm @@ -0,0 +1,48 @@ +package Koha::Biblio::Metadata::Errors; + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +use Modern::Perl; + +use Koha::Biblio::Metadata::Error; + +use base qw(Koha::Objects); + +=head1 NAME + +Koha::Biblio::Metadata::Errors - Koha Biblio Metadata Errors object set class + +=head1 API + +=head2 Internal methods + +=head3 _type + +=cut + +sub _type { + return 'BiblioMetadataError'; +} + +=head3 object_class + +=cut + +sub object_class { + return 'Koha::Biblio::Metadata::Error'; +} + +1; -- 2.53.0