<<

NAME

Koha::Biblio - Koha Biblio Object class

API

Class Methods

store

Overloaded store method to set default values

metadata

my $metadata = $biblio->metadata();

Returns a Koha::Biblio::Metadata object

orders

my $orders = $biblio->orders();

Returns a Koha::Acquisition::Orders object

active_orders

my $active_orders = $biblio->active_orders();

Returns the active acquisition orders related to this biblio. An order is considered active when it is not cancelled (i.e. when datecancellation is not undef).

can_article_request

my $bool = $biblio->can_article_request( $borrower );

Returns true if article requests can be made for this record

$borrower must be a Koha::Patron object

can_be_transferred

$biblio->can_be_transferred({ to => $to_library, from => $from_library })

Checks if at least one item of a biblio can be transferred to given library.

This feature is controlled by two system preferences: UseBranchTransferLimits to enable / disable the feature BranchTransferLimitsType to use either an itemnumber or ccode as an identifier for setting the limitations

Performance-wise, it is recommended to use this method for a biblio instead of iterating each item of a biblio with Koha::Item->can_be_transferred().

Takes HASHref that can have the following parameters: MANDATORY PARAMETERS: $to : Koha::Library OPTIONAL PARAMETERS: $from : Koha::Library # if given, only items from that # holdingbranch are considered

Returns 1 if at least one of the item of a biblio can be transferred to $to_library, otherwise 0.

pickup_locations

    my $pickup_locations = $biblio->pickup_locations( {patron => $patron } );

Returns a Koha::Libraries set of possible pickup locations for this biblio's items, according to patron's home library (if patron is defined and holds are allowed only from hold groups) and if item can be transferred to each pickup location.

hidden_in_opac

    my $bool = $biblio->hidden_in_opac({ [ rules => $rules ] })

Returns true if the biblio matches the hidding criteria defined in $rules. Returns false otherwise.

Takes HASHref that can have the following parameters: OPTIONAL PARAMETERS: $rules : { <field> => [ value_1, ... ], ... }

Note: $rules inherits its structure from the parsed YAML from reading the OpacHiddenItems system preference.

article_request_type

my $type = $biblio->article_request_type( $borrower );

Returns the article request type based on items, or on the record itself if there are no items.

$borrower must be a Koha::Patron object

article_request_type_for_bib

my $type = $biblio->article_request_type_for_bib

Returns the article request type 'yes', 'no', 'item_only', 'bib_only', for the given record

article_request_type_for_items

my $type = $biblio->article_request_type_for_items

Returns the article request type 'yes', 'no', 'item_only', 'bib_only', for the given record's items

If there is a conflict where some items are 'bib_only' and some are 'item_only', 'bib_only' will be returned.

article_requests

my @requests = $biblio->article_requests

Returns the article requests associated with this Biblio

article_requests_current

my @requests = $biblio->article_requests_current

Returns the article requests associated with this Biblio that are incomplete

article_requests_finished

my @requests = $biblio->article_requests_finished

Returns the article requests associated with this Biblio that are completed

items

my $items = $biblio->items();

Returns the related Koha::Items object for this biblio

itemtype

my $itemtype = $biblio->itemtype();

Returns the itemtype for this record.

holds

my $holds = $biblio->holds();

return the current holds placed on this record

current_holds

my $holds = $biblio->current_holds

Return the holds placed on this bibliographic record. It does not include future holds.

biblioitem

my $field = $self->biblioitem()->itemtype

Returns the related Koha::Biblioitem object for this Biblio object

suggestions

my $suggestions = $self->suggestions

Returns the related Koha::Suggestions object for this Biblio object

subscriptions

my $subscriptions = $self->subscriptions

Returns the related Koha::Subscriptions object for this Biblio object

has_items_waiting_or_intransit

my $itemsWaitingOrInTransit = $biblio->has_items_waiting_or_intransit

Tells if this bibliographic record has items waiting or in transit.

get_coins

my $coins = $biblio->get_coins;

Returns the COinS (a span) which can be included in a biblio record

get_openurl

my $url = $biblio->get_openurl;

Returns url for OpenURL resolver set in OpenURLResolverURL system preference

is_serial

my $serial = $biblio->is_serial

Return boolean true if this bibbliographic record is continuing resource

custom_cover_image_url

my $image_url = $biblio->custom_cover_image_url

Return the specific url of the cover image for this bibliographic record. It is built regaring the value of the system preference CustomCoverImagesURL

cover_images

Return the cover images associated with this biblio.

to_api

    my $json = $biblio->to_api;

Overloaded method that returns a JSON representation of the Koha::Biblio object, suitable for API output. The related Koha::Biblioitem object is merged as expected on the API.

to_api_mapping

This method returns the mapping for representing a Koha::Biblio object on the API.

Internal methods

type

AUTHOR

Kyle M Hall <kyle@bywatersolutions.com>

<<