Bug 33168: Prevent debhelper from renaming history.txt to changelog
[koha-ffzg.git] / Koha / Biblio.pm
index 5bf369c..8c453a8 100644 (file)
@@ -48,6 +48,7 @@ use Koha::Subscriptions;
 use Koha::SearchEngine;
 use Koha::SearchEngine::Search;
 use Koha::SearchEngine::QueryBuilder;
+use Koha::Tickets;
 
 =head1 NAME
 
@@ -88,6 +89,20 @@ sub metadata {
     return Koha::Biblio::Metadata->_new_from_dbic($metadata);
 }
 
+=head3 record
+
+my $record = $biblio->record();
+
+Returns a Marc::Record object
+
+=cut
+
+sub record {
+    my ( $self ) = @_;
+
+    return $self->metadata->record;
+}
+
 =head3 orders
 
 my $orders = $biblio->orders();
@@ -119,6 +134,20 @@ sub active_orders {
     return $self->orders->search({ datecancellationprinted => undef });
 }
 
+=head3 tickets
+
+  my $tickets = $biblio->tickets();
+
+Returns all tickets linked to the biblio
+
+=cut
+
+sub tickets {
+    my ( $self ) = @_;
+    my $rs = $self->_result->tickets;
+    return Koha::Tickets->_new_from_dbic( $rs );
+}
+
 =head3 item_groups
 
 my $item_groups = $biblio->item_groups();
@@ -1293,6 +1322,54 @@ sub get_marc_host {
     }
 }
 
+=head3 get_marc_host_only
+
+    my $host = $biblio->get_marc_host_only;
+
+Return host only
+
+=cut
+
+sub get_marc_host_only {
+    my ($self) = @_;
+
+    my ( $host ) = $self->get_marc_host;
+
+    return $host;
+}
+
+=head3 get_marc_relatedparts_only
+
+    my $relatedparts = $biblio->get_marc_relatedparts_only;
+
+Return related parts only
+
+=cut
+
+sub get_marc_relatedparts_only {
+    my ($self) = @_;
+
+    my ( undef, $relatedparts ) = $self->get_marc_host;
+
+    return $relatedparts;
+}
+
+=head3 get_marc_hostinfo_only
+
+    my $hostinfo = $biblio->get_marc_hostinfo_only;
+
+Return host info only
+
+=cut
+
+sub get_marc_hostinfo_only {
+    my ($self) = @_;
+
+    my ( $host, $relatedparts, $hostinfo ) = $self->get_marc_host;
+
+    return $hostinfo;
+}
+
 =head3 recalls
 
     my $recalls = $biblio->recalls;